Resources for my SDP session

23 בMay 2017

Hello friends, this session is about FROM WPF TO UWP, In briefly- As for Desktop applications, for the last 10 years WPF was (and still?) the best solution for windows OS. Now it is complicated, WPF is not the main player now, even that is far away from being deprecated. UWP of Win10 is the recommended platform for client side, in this session we will cover the abilities and compare those two technologies aspects from Performance to development time, via dev concept’s, patterns, devices, and more. We will try to answer the Big question of is it possible to migrate code from...
אין תגובות

WPF DatePicker presented text internal bug

18 בMay 2017

WPF Datepicker shows text before any date selected and that ‘Select a Date’ Now, if you working with custom template or other language or whatever, You can do that while overwriting the Control template, Than it founds interesting unit called PART_TextBox of type > DatePickerTextBox Well, this control present the selected Date as a Text, and whatever you will set in this section of template will be the startup text instead of ‘Select a Date’ like ‘peek some date’ The problem is, lets say you set any date than you want to reset your Form, I mean to return this control to its original...
אין תגובות

WPF performance checklist

30 בMarch 2017

Actually I am not using WPF so much those days, but as a guide at community workshop it came out and I promised to publish those conclusions out, so here we go.. and it is dedicated to you fellows .. Here is list of goodies: 1. Here is some gold rules can boost your app without great effort. 2. Remember Xaml item is a Class instance. 3. Since WPF use smart dependency property, ask yourself if every property you just seeing on your xaml file is really necessary. It specially critical while talking about Designer’s code or generated Xaml code. 4. Minimize the...
אין תגובות

UWP – Win10 – Files and Folders P2 – Drag drop elements.

27 בFebruary 2017

In this post we will jump in the real world scenario while user might drag clipboard files over our application pane and we like to copy those files and use them in our application. Drag-Drop: A few technical details. Your Dropping area (the place you attended to release the clipboard file) Should looks like this: <Grid Height="100" Width="100" Background="Red" AllowDrop="True" DragOver="Border_DragOver" Drop="Grid_Drop"/>   I have 3 different parts here, AllowDrop, DragOver handling, & Drop handling. Those are mandatory. The dragOver implementation is kind of : private void Border_DragOver(object sender, DragEventArgs e) { ...
אין תגובות

UWP – Win10 – Files and Folders P1

22 בJanuary 2017

Introduction For .Net developers who begin working on UWP apps it is must to upgrade the knowledge base. Well that API has changed now, and its happened since WIN10 development vision to unified the entire dev API for all platforms and devices under common types, meaning we no more writing code for devices but for OS. Every application got an isolation built in storage to serve the application lifecycle. In edition UWP application has no permissions to read a file from anywhere outside the application folder (will discussed later on) as hard drive. If you want to read a file in the user's...
אין תגובות

Using Smart CLR Property as object repository

4 בDecember 2016

the next scenario can be Simple, yet during development it is hard to change design so tricks like that can be awesome. Consider the following entity. public class Cat { public string Name; } public class Dog { public string Name; } class Wrapper { public bool isDog; private Dog dog = new Dog() {Name = "Snoopi" }; private Cat cat = new Cat() {Name = "Tom" }; public string Name { get { ...

Xaml default background and transparent background

6 בNovember 2016

Xaml  default background and transparent background This post will guide you to the internal rendering brush mechanism with interaction between elements on the element visual tree, could also be relevant to solve UI bugs on xaml code, (which are not bugs in simple meaner, only misunderstanding of the platform) 1.    While debugging an visual tree of custom control template you might find elements with Background =””. In most of cases it will not harm your application, But can also be effected in user actions. 2.    Observe this code: <Style x:Key="listItem" TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> ...
אין תגובות

UWP – when Build failed on different computers

25 בOctober 2016

An important Deployment action. You worked at the office on universal apps application, You take the code with you as whole solution to continue at home. While trying opening the solution its ok, also build action its ok even rebuild action.. Only when try to debug the project (F5) you might face of with annoying evil. Something like : Registration of the app failed. Another user has already installed an unpackaged version of this app. The current user cannot replace this with a packaged version. The conflicting package is {some Guid} Well it simple in universal apps there is underline deployment session, Every project has  a manifest...
אין תגובות

UWP Win10 – introduction to page navigation.

28 בSeptember 2016

The Application block of Win10 app constructed as following: Application > Window > Frame > Page While this page  can be any page you like. Commonly use pattern is leave the main page as container and inside it use internal page as Content place holder. Lets build the solution files than continue on navigation implementation. I simply create solution folder named Pages with some pages inside, Now lets build the MainPage xaml: <Grid Background="LightCyan"> <Grid.RowDefinitions> <RowDefinition Height="1*"/> ...
אין תגובות

UWP new Controls – Layout controls

11 בSeptember 2016

In this post I will passing over some major layout technics for developers who moving forward to UWP environment. This migration from former Windows versions required a short introduction and that my posts about. In for this time: Layout controls Pivot-Control: Actually its not new, just replacement to the traditional tab control, with nicer behavior and looks Code: <Pivot Title="My Pivtos"> <PivotItem Header="Pivot Item 1"> <Page> ...
אין תגובות