UWP Binding vs. X:Bind part B

13 בDecember 2017

x:Bind with methods & events Back to the start, Xbind allow us to directly binding Events to Functions which is awesome, it just downgrade the Command pattern , Binding of course just can’t . there is no restriction about binding to method, you can bind with arguments, to return value etc. & of course the default EventHandler signature with default parameter or without. For example: <VariableSizedWrapGrid>    <Button Content="click to void method" Click="{x:Bind Foo, Mode=OneWay}" />    <Button Content="double method with args" Width="{x:Bind Foo2(100),Mode=OneWay}"/>    <Button Content="sting method" ToolTipService.ToolTip="{x:Bind Foo3(),Mode=OneWay}" />    <Button Content="Event pointer enterd method" PointerEntered="{x:Bind Foo4}" /> </VariableSizedWrapGrid> private void Foo() { } ...
אין תגובות

UWP Binding vs. X:Bind part A

4 בDecember 2017

WPF most thrilling was probably the Binding concept, its now kind of standard in many other client frameworks (like Angular ??) Anyway like every other good thing its came with a price, like worse performance and severe debugging. In UWP Microsoft announc X:Bind –the new Binding concept who works in parallel path to old Binding concept, and supposed to leverage the performance, the Debugging, and to simplify things. However, a lots has changed from Binding to x:Bind. In this post I will facing off those two tremendous technics by syntax, concepts, performance, debugging , features, and whatever I can provide you. Behind the hood. As...
אין תגובות

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