Add DataTemplate programmatically to show show DataGrid/ListView columns
Hello,In my application, i want to show some properties from an object in a ListView or DataGrid. I want to programatically add a DataTemplate which will show some selected columns in the code file.Can...
View ArticleTemplate to bind a Hierarchical Data in a DataGrid...
Hello,In my application, I have a employee class. Each Employee class is having following properties:Name : stringID : Int32Designation : stringSubordinates (Collection of Employees reporting to this...
View ArticleWPF combo on datagrid - property update and RowEditEnding event
2 problems. I have a combobox on a datagrid and am having problems obtaining the selected item so that the underlying database is updated. (not using EF or MVVM. I'm not sure why, but I'm not at this...
View Articlehow to set a binding on a DataGridTextColumn??
DataGridTextColumn column = newDataGridTextColumn();Bindingb =newBinding();b.RelativeSource = newRelativeSource(RelativeSourceMode.FindAncestor,typeof(TabItem), 5);b.Path =...
View ArticleSubclassing Canvas
Hi, I am writing a XAML/Net3 baed application and I wish to create my own canvas that has some base methods that I need. I created a new class: class MyCanvas : Canvas{ void MyCustomFunc() {...
View ArticleCasting an ObservableCollection(of Object)
Here is some sample code. I would like to understand why I can't cast an object I know is inheriting from ObservableCollectionto a generic ObservableCollction(of Object). In this scenario I get the...
View ArticleButton Rotation in wpf
Hi,I am having 5 buttons in a stackpanel.First time i should show only 3 buttons and after some time let say 10 sec i need to show remaing two buttons and again after 10 sec 3 buttons etc. Let me know...
View ArticleEMCAScripting in WPF or Windows Application
Folks,It may look absurd about the question, using EMCAScript in WPF or Windows is that possible ? I'm aware it is a client side scripting language, and I assume it's not possible to use EMCAScript in...
View ArticleTabControl controls are missing for UI Automation
I am attempting to automate a WPF web application using the UI Automation classes from a seperate C# application. The WPF "server" application, however, has much of its content (controls) on a...
View ArticleStruggling to achieve docking so controls automatically resize and remain...
I have tried without any success to create a window containing several controls so the controls will resize as the window is resized. I really need help! Below is the code:<Window...
View ArticleWPF: Couldn't copy hyperlink text from textblock
Hi Guys, in WPF i have the text-block hyperlink inside the HierarchicalDataTemplate. In total i got 2 text-blocks and I can copy the text from one text block during check-box click but I couldn't copy...
View Articlewpf Application is crashing on windows 8.1 (which is working fine on Windows 8)
Hi ,We have Windows-based trading application (in wpf), which Is already live.Till Windows 8 we have no complaints from clients but when some of our clients upgraded to windows 8.1, application is...
View Articlemvvm & ef & model changes
Hi,I have a masterdetail program. The datagrid is bound to the Rows property which is an observable collection and the detail is bound to the CurrentRow property which is a class from the entity...
View Articletabbing issue at the DataTemplate
I am having tabbing issue for a DataTemplate within a Grid in a WPF program.The program will automatically add a user control into a Grid. The user control has a DataTemplate, which has several textbox...
View ArticleWPF RadioButtons in details UserControl unchecked when navigating through...
I know there have been a lot of issues with the .NET 3.5 RadioButton, but I believe this is a different issue that I have not found anything on in my searching. I've put together a very minimal code...
View Article3D model, how can I use it from WPF?
Hi all of you,I've generated a 3d model based on 25 photos of one car using AutoDesk 123d online.I wonder how can I use this model in a WPF page..Primary platform is Windows 7 Ultimate 64 bit along...
View ArticleHow to set Row size or percentage in code?
I am creating a Grid in code and returning the generated markup to be used as the Content of a ContentPresenter. My problem is that I have clear guidelines as to the proportions of the Grid rows....
View ArticleWmi Drive connected, disconnected question
heyi try to use wmi to hook a Loop, that throw a message if any device is connected or disconnected. This Looks like:DrivesLoopWatcher_GV = new ManagementEventWatcher(new WqlEventQuery( @"select * from...
View ArticleHow to create WPF adorners visually??
All the examples I see on adorners, the adorners are implemented via code, I haven't seen how to create adorners visually, via disign environment. In other words, can one create an adorner in the...
View Article