Friday, June 28, 2013

MahApps Flyout Loading Panel

I have started developing a new application for work with the MahApps windows framework and I have to say it is amazing.

I love it because the whole window is restyle to look like a Windows 8 metro application and the flyout panel is a very nice feature to have in any application.

In this sample I would like to show you one of the power of this framework, the flyout control.

Loading Flyout Panel

Please let me know if you like it.

Tuesday, October 2, 2012

WPF Sorted Enum ComboBox

In this sample; the value displayed in the combo box is the Enum attribute value and not the Enum value itself.

This would therefore give you the flexibility to have a more descriptive text to display.

public enum Country : int
    [Description("Australia (AUS)")]
    AUS = 0,

    [Description("United States (USA)")]
    USA = 1,

    [Description("United Kingdom (GBR)")]
    GBR = 2,

    [Description("France (FRA)")]
    FRA = 3,

    [Description("Germany (GER)")]
    GER = 4,

    [Description("Spain (ESP)")]
    ESP = 5,

    [Description("Jamaica (JAM)")]
    JAM = 6,

    [Description("Japan (JPN)")]
    JPN = 7,

    [Description("Uruguay (URU)")]
    URU = 8

But then there is a problem of displaying the value in order of the Enum attribute.

So I wrote a sample app to solve this problem.  

Enum ComboBox

Please let me know if this helps you.

Thursday, August 30, 2012

Powerball Most Picked Numbers

This is a little application that I wrote for fun.

It will read a list of power ball numbers and select the top 5 most picked numbers, plus the top most picked power ball number.

Powerball Reader 

Please let me know if you like it.

Thursday, July 21, 2011

WPF Expanding Menu

This is just a nice simple demo using toggle buttons to display an accordion style menu.

Expanding Menu

Please let me know if this helps you.

Wednesday, July 20, 2011

WPF Loading Panel

Having a nice loading panel with a progress bar showing that some work is in progress is a very cool feature to any application.

With this control you can show a loading panel as you are going and fetching data from the database, it will update your window with up to date progress messages.

<ctr:LoadingPanel x:Name="loadingPanel"
IsLoading="{Binding PanelLoading}"
Message="{Binding PanelMainMessage}"
SubMessage="{Binding PanelSubMessage}"
ClosePanelCommand="{Binding PanelCloseCommand}" />

Loading Panel

Please let me know if this helps you.

Wednesday, October 27, 2010

Rx Lazy Loading Text Box

I started using .Net Reactive (Rx) extensions for work recently.
As a WPF UI developer, one of the nice way of handling a users input is not to do anything until the user have complete his/her action.

In this example; I have a text box, which will auto filter a data grid when the user stop typing in the text box and the text changed event is fired.
This will improve the UI responsiveness, instead of firing after every key is entered.

// Method OnSearchTextChanged is called .5s after Text Box text changed
Observable.FromEvent<TextChangedEventArgs>(textbox, "TextChanged")

This was only possible in the past throught the use of Timers and Thread.Sleep, Rx makes this easier to do.

Lazy Loading Text Box

Please let me know if this helps you.

Sunday, August 15, 2010

WPF Value Type Text Box

I wrote a WPF numeric text box control that can support currency, integer and numeric values.
It can prevent invalid input such as letters, spaces, etc. and can be constrained to a max length value.

For example, with the currency text box; when the text box is in focused the formatting is removed allowing the user to enter the value.
When the text box loses focus, formatting is reapplied and display in the text box.

Value Type Text Box

Please let me know if this helps you.