UWP Binding vs. X:Bind part B

Wednesday, December 13, 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

Monday, December 4, 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...
אין תגובות

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

UWP Win10 – introduction to page navigation.

Wednesday, September 28, 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

Sunday, September 11, 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> ...
אין תגובות

From WPF to UWP – New controls

Monday, August 29, 2016

For those who familiars with WPF this post is special for you while merging WPF skills with upcoming UWP skills , I am not gonna talk about layout here only spotting for some new features that I found nice to use. Flyout- this new Control can gardening almost anywhere to provide extra information like tooltips or even takes  traditional Dialog places. Flyout Demo: <Button Width="100" Content="Hello Button" > <Button.Flyout> <Flyout Placement="Full"> ...
אין תגובות

UWP-Win10- Working with Adaptive triggers

Thursday, August 4, 2016

One of the new features while developing for Universal Apps is Adaptive UI, Having thinking of cross devices, we should never build a fixed UI, consider big PC Laptops, Tablets or even smartphone, It is very easy actually, just register to main window size changed and manage the layout state according to current MainWindow size -* First observe the next image: in general this is a wide screen state. Than observe that image: In general it is a narrow state. So, what we have here is a simple technic which required some practices to make the best from it, The UI content is simple: <RelativePanel> ...
אין תגובות

TemplateBinding and TemplateParent Digging

Monday, May 9, 2016

One of the things that can completely freak you out. Lets start with facts: 1.  While customize an application you might use something like this: <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=MyProperty}"/> Or maybe this: <TextBlock Text="{TemplateBinding MyProperty}" /> While this is on the ResourceDictionary of your app and about to styling your custom control, and MyProperty is an DependencyProperty on the logic part of the Control so what the different between those two?  And what the default choose should be? By the way while most of programmers used to write You can use the Short way as: Text="{Binding TemplatedParent.MyProperty2}" 2.    A full demonstration will be like  this one: public class CustomControl1 : Control ...
אין תגובות

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

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