I have about 2 - 3 years of experience with WPF on .NET framework 3.5. I start programming in WPF by Windows Presentation Foundation Unleashed, I use its as reference as well.
Now, I have a plan to move to WPF 4, which I think I need to refresh my knowledge on WPF. I want to know can I still use my old book or it's better to buy new one...
Hello,
Because of bug and performance issues associated with the default WPF splash screen, the recommended solution across multiple forums seems to be to create a Native C++ application that displays the splash screen and then loads the WPF executable. There are certainly no shortages of examples online.
I've implemented an example l...
Hi,
I have a tree view on the left pane and grid on the right pane. I need to drag and drop items from grid to tree. How do I reference the source and target of the item that is being draged?
...
The same line of code in the same assembly works for one test fixture but not another. Here is the line of code:
var dic = new ResourceDictionary { Source = new Uri("pack://application:,,,/MyApp.Wpf;component/ImageResources.xaml") };
The error I get in the other test fixture is System.UriFormatException : Invalid URI: Invalid port spe...
I want to choose different DataContext for UserControl, based on what user specified in xaml, suppose I have a user control:
public partial class UcMyControl : UserControl
{
public UcMyControl()
{
InitializeComponent();
if (Group == "Group1")
this.DataContext = DataContextA;
else if (Group ==...
I am new in MVVM. I just learn this pattern and want to use it in my project. I am already understand working principle of this pattern and learned how to use Commands. But I have question how to handle events of another controls for example ListBox SelectionChanged event. ListBox haven't Command attribute
...
Hi,
I have hashtable that contain wpf and telerik controls,
and I need to serialize it to xml file.
I found this code for wpf controls:
string savedButton = XamlWriter.Save(origianlButton);
File.WriteAllText(@"C:\test.xml", savedButton);
but it doesn't work for telerik controls, it stuck and I get this error:
An unhandled exception ...
I want to catch the event when a listview is left-clicked on an empty space - i.e. clicking on no item within the listview control.
I've search in the Events list of the listview but found none. How can I do this?
Please help!
[Edit]
What I want to do if I could catch this event: Deselect all items in the listview.
...
In an application that has a tab control with multiple tabs where each one contains an entity which is possibly being edited, how would you signal the tabs to find out if they are in edit mode and shouldn't close?
RoutedCommand or RoutedEvent maybe?
So the top window needs to request all children that are open (they may be of different...
Hi I have a TreeView which is filled with a hierarchicaldatatemplate
<TreeView Name="DokumentBrowser" ItemTemplate="{StaticResource HierachrTree}"
<HierarchicalDataTemplate x:Key="HierachrTree"
DataType="{x:Type src:Ordner}"
ItemsSource="{Binding UnterOrdner}">
<TextBlock Text="{Binding OrdnerName}"/>
...
Hi,
Firstly: apologies if this is a duplicate post. Things got a bit confusing as I'm trying to post/register at same time.
I started investigating running UCI chess engines from a simple WPF window, got the hang of having the chess engine running onf a different thread to the interface, and have created a reasonably servcieable text-b...
Hi,
I have WPF usercontrol that is binded to some data, when I run the usercontrol it shows the data, but when I place the usercontrol on WPF window it shows blank with no data!
What is the correct way to add binded usercontrol to WPF window?
...
I'm developing a kind of Graphical free activity diagram/circuit editor. I have to make it with C# or C++. I prefer C# though. What do you suggest I should use? Should I use the WPF (Windows Presentation Foundation)? or just add the presentation namespace to a normal Windows Application project or do you suggest a different method. I nee...
The background
I use VS2010, DataGrid (the one delivered with WPF) and I manually create rows and columns. I set various colors for rows, depending of their state (but for simplicity let's say it was yellow). It worked because datagrid used labels for displaying text, and when I set background for row, it is reflected in label widget as...
I need to tile a picture in a WPF Image Control (like on Windows Desktop (Background tile property)). Does somebody know weather this is possible and if so, how?
Best regards,
Alexander
...
I need to do call a function according to any data change in WPF (C#) page, that is if any of the data of the current page is changed such as Textbox, Radiobutton, Checkbox, Combobox, Datagrid etc then I need to call a function how can I do it without using different event ?
...
Hi experts,
I’m playing around with a little VB.NET app with WPf/MVVM and ADO.NET EF on a SQL Express-DB and I’m running into problems while trying to update related objects:
My DB has three tables “tb_Actors”, “tb_Movies” and a junction table “tb_movies_actors”. The EF designer creates two entities "Actors" und "Movies" and sets thei...
It appears WindowsFormsHost control is set to display on top. Is there any way to change its z-order to allow other WPF controls on the same window to be visible on top of the WindowsFormsHost control?
...
In some programs, for example, Microsoft Office Excel, when you’re at the end of the document being edited and then press a right or down arrow of the scrollbars, then, you scroll further and the edited area will grow, producing more space for entering data. Can this functionality be implemented in WPF?
I tried using ScrollBar instead o...
Hello,
Today I noticed a strange behavior regarding binding the header of a DataGridColumn to the ViewModel.
The following binding works perfectly (name of the DataGrid is MyGrid):
<DataGridTextColumn Binding="{Binding Name}" Width="*" CanUserReorder="False" CanUserResize="False" IsReadOnly="True">
<Da...