Hello, i have some user control and i want to disable Alt+F4 oportunity for the end user. When my User Control shows, there is opportunity to close it with Alt+F4, then program goes to base class in the method:
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
//Content = null; // Remove child from lo...
Hello,
I have a form and a button should be enabled only if the listbox is not empty. How can I do binding for this case?
Note: I would like to avoid creating custom converter.
Thanks!
...
I have treeview control and i want bind tree nodes IsExpanded property to my datasource items!
But i have exception:
System.Windows.Markup.XamlParseException occurred
Message=Set property '' threw an exception.
StackTrace:
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Silverlig...
Hi
Trying to understand this binding process of the WPF.
See the code at the bottom.
In my "viewmodel", see the code at the bottom, i have an observable collection that is populating the listview with the items. Thats the one that contains a path called symbol to set the selected index in the combobox. Now my problem is that i need to...
hi there
Whats the ideal way to bind a EntitySet to a DataGrid?
I use VS2010 and the .NET 4.0 Framework.
The item in the class bound to the DataContext of my form does have the following property:
public EntitySet<MyObject> objectsToBind
{
get { return context.MyObjects; }
set { context.MyObjects= value; }
}
Any help or hints gr...
I am using the MVVM pattern, I have a view which creates a new ViewModel, after the user clicks save, this view is closed and a seperate view is opened which Displays a collection of view models in a list view.
This list view is sorted in alphabetical order, so the new ViewModel may appear at the bottom of the listbox, which is not imme...
I'm currently trying to wrap my head around WPF, and I'm at the stage of converting between coordinate spaces with Matrix3D structures.
After realising WPF has differences between Point3D and Vector3D (thats two hours I'll never get back...) I can get a translation matrix set up. I'm now trying to introduce a rotation matrix, but it see...
Okay, to give a little background, I learned WPF about 3 years ago and have kept reasonably up to date with what's happened since in various different versions. I looked at (and implemented) MVVM on a couple of projects, had a good look at frameworks like Prism so I think I'm pretty well versed in most areas of the framework. I've also...
Hello everybody,
i am using the mvvm light toolkit to create a WPF application. I created a user control and a corresponding ViewModel. I created a ViewModel property in the ViewModelLocator. I bound the user controls datacontext to the property in the Locator class. When i edit the User Control in Blend or the VS Designer everything se...
Hi,
I have a ControlTemplate for my ListBoxItems and i want to animate between 4 different colors for the 4 Possible states of the Properties IsSelected and IsMouseOver.
I have tried this using a MultiTrigger like this (IconBorder is a border surrounding the ListBoxItems
<MultiTrigger>
...
Hi guys,
I'm trying to make a WPF window that opens already maximized, with no resize/move (in systemmenu, nor in border). It should be maximized all the time, except when the user minimize it.
I tried to put WindowState="Maximized" and ResizeMode="CanMinimize", but when window opens, it covers the task bar (i don't want it).
I have a...
Some context here...I have a System.Windows.Window that is used to display a modal message box. I created a Show() method that initializes the content of the window, and then calls ShowDialog(). The user clicks a button on this window, some information about the clicked button is set in the Tag property, and then the window is closed via...
I have a class
public class NavigableViewport3D : Viewport3D. The class should hide the the Viewport3D.Camera property, so that it becomes read-only. Here's what I have so far:
public class NavigableViewport3D : Viewport3D
{
protected static readonly DependencyPropertyKey CameraPropertyKey = DependencyProperty.RegisterReadOnly(
...
Hi Guys,
I am trying to place a canvas within a control which I will then use a Layout transform to implement zooming functionality. The problem is that while enlarging the canvas is easy, cropping the required section is proving difficult. I think it boils down to the following example code:
<Canvas HorizontalAlignment="Center" ...
I'm trying to make a model editor (UML) in WPF, a bit of practice to get comfortable with WPF development. I'm kind of stuck however. I want to be able to drag and drop my components on the canvas, which I got working when I added a single item to the canvas.
However, obviously I need to have more than one item on my canvas. This would b...
what am I missing having this code behind on a XAML window
// Create a window and make this window its owner
Window ownedWindow = new Window();
ownedWindow.Owner = this;
ownedWindow.ShowDialog();
I don't see the behavior
http://msdn.microsoft.com/en-us/library/system.windows.window.owner.aspx
Once this relationship is established, the...
Here's my situation:
I've got a User interface ItemsControl "ResultsPresenter" (WPF) pulling from a ListCollectionView that uses a BindingList "Results" from a non-UserInterface class as the ListCollectionView.Source property.
Whenever I make a change to "Results" such as an add operation, I get a NotSupportedException, insisting tha...
Hi,
I am developing a small WPF application which is using web service. The web service is only available for internal users and they have to be logged in to their machines to be able to use it - it is using windows credentials.
Everything works well except the connection speed. It takes around 10 sec to initiate the connection and do...
I'm experimenting with MVVM and I can't quite wrap my mind around it.
I have a View (windows) that has several repeated controls.
Let's say I have 4 textbox - button pairs. Their behavior should be the same, after pressing a button paired textbox says "Hello World!"
I have tried several options I could think of:
One ViewModel, 4 st...
if i have something like that:
<StackPanel Orientation="Horizontal">
<TextBlock Text="FIRST" Margin="5" VerticalAlignment="Center" />
<TextBlock Text="SECOND" Margin="5" VerticalAlignment="Center" />
<TextBlock Text="THIRD" Margin="5" VerticalAlignment="Center" />
<TextBlock Text="FOURTH" Margin="5" Vertica...