Browse by Tags
All Tags »
WPF (
RSS)
Update 26/09/2011 - There is an issue with the control where the entire tree is loaded, which may affect performance and memory allocation when working with many items. Unfortunately, I don’t think I would be able to fix that any time soon. A few years back, I built a WPF control that I decided to share here now. The control is called ComboView – A ComboBox showing a TreeView inside to display hierarchical data (you can use it for flat data if you need its features though). The control provides some...
In continuation of the previous posts - WPF – Editing Mode with Save and Cancel Capability WPF – Editing Mode with Save and Cancel Capability – Dynamic ViewModelProxy In this post I will demonstrate an elegant and simple solution that you can use regarding the second option presented in the first post series (cloning via serialization). The Use-Case Often, in more advanced scenarios, you need to duplicate your object for a different view. (read the first post for more detail) A commonly used technique...
Update 29/07: The project was updated, there was a minor bug in the object changed notifier. In continuation of a previous post - WPF – Editing Mode with Save and Cancel Capability In this post I will demonstrate an elegant and simple solution that you can utilize regarding the first option presented in the previous post. The Use-Case If you want to open an editable view over an existing read-only view with cancel capability, you usually wish you could use the same ViewModel instance as the DataContext...
A common scenario that is required by applications is the ability to show an entity in a view mode, and when the user wishes to edit that entity, another view is loaded in edit mode. In most cases, you would allow the user to save or cancel his changes. To illustrate the concept, consider the following interface - When a user clicks ‘Edit’: Usually, in a MVVM application, you would have a view model for each list item on the left screenshot. When the user clicks ‘Edit’ and the editable view is shown...
Update 29/07: The project was updated, there was a minor bug in the object changed notifier. A few years back I was looking for a good place to start with for building a nice feedback control. The purpose was to allow end-users to provide feedback on the application on any given subject. After browsing the internet, I found the following - Creating a 3D book-shaped application with speech and in using WPF 3.5 by Roberto Sonnino . It’s a very cool and a beautiful project, nice work Roberto! To make...
Update 29/07: The project was updated, there was a minor bug in the object changed notifier. Be sure to read the first post - Part One After showing the most basic in part 1, let’s see a real-life example of my finalized solution. I created a sample application which looks as follows - Let me go through this very quickly - The main view is bound to a MainViewModel. The employees list view at the left is bound an EmployeeListViewModel which is a member of the MainViewModel The employee details at...
Well, it has certainly been a while since I got to a good posting rhythm, I hope it changes soon because I have a series of posts in mind. This isn’t a post about general help and description for PRISM, MVVM, or DelegateCommand. There are many resources about these already. This post is to demonstrate how I managed to extend the DelegateCommand with some really cool features. The DelegateCommand that ships with CAL expects an “execute method” and a “can execute method” arguments in its constructor...
Update 26/09/2011 - There's an updated version available in the archive ' Zuker.WpfSamples.zip ' with minor bug fixes. Finally, the last post of the series :) Initial posts - WPF Popups and ToolTip behavior - A Journey WPF Popups and ToolTip Behavior – Implementation Attached is my final solution with a working example. Usage <Control> <controls:RichToolTip.PopupContent> <RichToolTip> <TextBlock Text="This will be displayed in the popup" /> </RichToolTip>...
A very nice extension built for WPF, Read the full details Here . E.g. - < Polyline Points ="{ln:PyBinding PointCollection([Point(p.Time, p.Value * $(Container.ActualHeight) ) for p in $(.MarketData.DataPoints) ])}" Stroke ="IndianRed" StrokeThickness ="1" /> Very cool!
There are times in which you would have code that does some runtime work that will cause the designer to fail loading the WPF content and display the error. At such times, you might want to tweak your code to support this need. Let's look at the following example for a converter: public class TemplatePickEnabledConverter : IMultiValueConverter { public object Convert( object [] values, Type targetType, object parameter, System.Globalization. CultureInfo culture) { int id = ( int )values[0]; ...
Make sure you check the latest source and bits of: WPF Toolkit DataGrid v1 DatePicker/Calendar v1 Visual State Manager Preview Ribbon Preview Silverlight Toolkit AutoCompleteBox NumericUpDown Viewbox Expander ImplicitStyleManager Charting TreeView DockPanel WrapPanel Label HeaderedContentControl HeaderedItemsControl Themes - Expression Dark / Light | Rainier Purple / Orange | Shiny Blue / Red
Via this post . "This document covers the design and some implementation details of getting WPF windows wrapped in custom chrome. Currently WPF supports standard windows, with an icon, title-text, and caption buttons, as well as borderless windows, which when combined with transparency allow arbitrary top-level shapes but the application loses system support for behaviors associated with having a standard caption area, such as maximize. There is a desire to create applications that fill a middle...
I am currently working on a WPF project which I needed a ToolTip with a certain behavior: It should act like a ToolTip Support content template Appear upon hovering with a small interval Appear once - hovering another element with a tooltip should hide the last shown tooltip. Support Rich Content The latter is marked as bold since that was the essential requirement that made me not use the ordinary WPF ToolTip. I needed the ToolTip to hold rich content - such as clickable buttons. This also implicates...
In continuation to my first post - WPF Popups and ToolTip behavior - A Journey I decided to approach the implementation of such a popup like the ToolTip and ContextMenu are doing it themselves. I did not inherit from Popup but rather created my own control and I used the Popup.CreateRootPopup which sets the Popup.Child property to my control and it picks up on all the ToolTipService properties defined on my control. I started from reading the following post: Popup your control There were some problems...
Via this post . I won't elaborate so much about it, do read Lester's post in the link above. The new feature introduces useful and simple usage to control string formatting in binding statements. No need to use converter everywhere :) A good thing! < TextBox Text = " {Binding Path=Double, StringFormat=F3 } " />
More Posts
Next page »