Resources for my SDP session

Tuesday, May 23, 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

Thursday, May 18, 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

Thursday, March 30, 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...
אין תגובות

Xaml default background and transparent background

Sunday, November 6, 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"> ...
אין תגובות

Prism 6 from ground up by 10 minutes

Sunday, April 3, 2016

In this post we will build a small app using Prism 6 and Unity together with all necessary  tools. One of the commonly known issues  with Prism is the different between versions and dlls. So I choose in the demo to use the last nugget package and to trust it. Than to manipulate all around it, Well surprising way, installing unity for Prism 6 was include automatically all Prism 6 dependencies which reduce any computability  issues Well, Prism architecture is simple, A. We have Shell which is the main window and probably the only window in the application. B. We have Regions inside the Shel and they would...

Customize Window header Style

Thursday, March 10, 2016

In case you demand some extras from your MainWindow as programs like Microsoft Office did, Lets say extra icons, menus , buttons or whatever. The built in Window of System.Window type and its API in Xaml is very uncomfortable for customization and guess what , you the one who need to do all the dirty work. All of it? well I gonna help you to how to start. In this screen shot I have, 1 . Icon on left (standard) 2. App name at left (standard) 3.  details on center (extra) 4. app special menu at right (extra) 5. window buttons at left (kind of standard) So, first...
אין תגובות

MVVM View first VS. ViewModel first

Monday, January 25, 2016

Since early times UI developers has merchandise with the purpose of MVVM It is hard to judge what is better way to develop with,  in this post I will try to demonstrate they both,  and compare a little but definitely not to have a statement of what is right, -  The term of ViewModel evolution 1: Is it a Model translation for presentation layer, So when we writing this ViewModel class we actually relay either on a real model like  a physical entity or virtual one like other class  -  The term of ViewModel evolution 2: In MVVM CodeBehind is prohibited, there for every reaction for...
אין תגובות

Follow Xaml code Order or don’t be there

Monday, December 7, 2015

Sometimes you surprised from tiny things around you day who might taking you out of control. For example the Order of the Xaml elements on your sheet. The famous one is probably using a source who defined later, like: <DataTemplate x:Key="dt1"> <Grid> <Button Style="{StaticResource style2}" /> </Grid> </DataTemplate> <Style TargetType="Button" x:Key="style2"> In this case there is some...
אין תגובות

Attached Property – select all text

Tuesday, October 27, 2015

in TextBox control double clicking on Text should select all inner text? Well isn't? not for case the text itself is a complex one, like real number like : 23.34 In that case , it will select but only the part you on it, at least by default What we need now is activate the TextBoxBase.Selectall function but using WPF tools and supporting MVVM architecture. The simple solution will be Attached Property or Behavior , I think that Behavior should kept for complex problems when we do need a reference per control instance , and here a simple static property should be enough. There for...
אין תגובות

WPF Custom Controls – toggle buttons with Group

Sunday, October 4, 2015

The idea is quite simple , create header of ListBox who combine two types of contents, to be acting like an tab control , meaning filtering the Listbox content, and So , for implementation we can considerate a few options, Tabcontrol , RadioButtons , Toggle Button etc.. Just for the fun I have made it with toggles, the truth is I where must use them because of look an fill demands and styling but this is not the point, The point is what between RadioButton control and ToggleButton control, the main issue is the group who might surround the radio buttons and auto switch...
אין תגובות