I've been looking at this article but am having issues saving the enumerated value in the settings.
I have created the following enum
public enum FType
{
None,
Delimited,
FixedWidth,
XML
};
I have the radio button selection working nicely but I now want to store the selected option in the settings but there doesn't ap...
Hi,
I have a UserControl which has a quadratic Image as a Child. This Image is at the bottom of the UserControl, and half of it is clipped (e.g. the Control's Height is 400, Image's height is 200 and it is set to y=300).
Now, When I rotate the Image, it is still clipped like the way it was first. Like when rotating around 90 degrees, I...
I am using my custom validation engine to validate my ViewModel properties. I am stuck at the last step. I want to change the background color of the TextBox when the validation fails. So, I implemented DataTriggers and binded it to the HasError property. HasError is a normal CLR property.
public bool HasError
{
g...
I've messed around with PreviewLostKeyboardFocus which almost gets you there. I've seen a couple of implementations using LostFocus, but that just forces focus back on the TextBox after it's lost focus and you can easily see this shifting on the screen. Basically, I'm just looking for the same type of behavior you could get with using ...
I have a TreeView that is bound to a tree of ViewModel instances. The problem is that the model data is coming from a slow repository so I need data virtualization. The list of sub ViewModel below a node should only be loaded when the parent tree view node is expanded and it should be unloaded when it is collapsed.
How can this be impl...
I am working on a UserControl, which is composed of a Chart panel and another area which manipulates some of the chart data i.e. the chart controls (change color of graph, enable or disable stuff on the chart, etc.).
I use a ViewModel to manage the chart and its data, but was thinking maybe it would be nice to make a separate usercontro...
Hi all,
I'm Trying to get the value of a slider thats contained in a window from a usercontrol thats also contained in that window.
this is what i would like to accomplish.
<Window x:Class="TestApp3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"...
I have build my own custom validation framework for WPF using attribute based validation. I am stuck on the last step which is to highlight the TextBox. Actually, it does highlight the textboxes but all the textboxes are dependent on a single property HasError.
public class RegistrationViewModel : ViewModel
{
[NotNullOrEmp...
Hey guys
Does anyone know why this binding is causing an error in the WPF designer? ("Exception has been thrown by the target of an invocation.")
XAML (partial):
<Window xmlns:local="clr-namespace:MyAppNamespace">
<DataGrid ItemsSource="{Binding Source={x:Static local:Clients.Instance},
Path=Cli...
I have the following XAML:
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=Errors, Converter={StaticResource ErrorsCountConverter}}">
<Condition.Value>True</Condition.Value>
</Condition>
<Condition Binding="{Binding Path=Errors[0].HasError}" Value="Tr...
Hello,
I'm new to WPF and I'm trying to build a dropdown menu using the expander. Page layout is being handled with a Grid.
The extender sits inside the first row of the grid and I would I would like the contents of the expander to expand over top of the contents of everything below when it's clicked. Unfortunately, right now, the ...
I need to have a command handler for a ToggleButton that can take multiple parameters, namely the IsChecked property of said ToggleButton, along with a constant value, which could be a string, byte, int... doesn't matter.
I found this great question on SO and followed the answer's link and read up on MultiBinding and IMultiValueConverte...
I've run into a situation where I'm leaking unmanaged memory when the mouse is moved over my WPF app. Specifically, when I profile the application in perfmon or Red Gate's memory profiler, the private bytes monotonically increase, but the bytes in all managed heaps stay constant -- which, I believe, means that the app has an unmanaged l...
I've read on few places already, that it's possible to combine XNA and WPF.
What I personally need is a game/map editor, which would actually be the game itself (would have the engine running in background), because map system writes serialized versions of objects to XML, which are later loaded.
My problem is that I want an standard app...
I have a grid that I dynamically need to resize in the number of columns based on the size of my window.
The only way I have found to make it work is using:
FrameworkElementFactory fGrid = new FrameworkElementFactory
(typeof(System.Windows.Controls.Primitives.UniformGrid));
fGrid.SetValue(System.Windows.Controls.Primitives.UniformG...
Let's say that I have this storyboard:
<Storyboard x:Key="OnMouseEnterStoryboard">
<DoubleAnimation BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="180" />
</Storyboard>
It's there a possibility that I can set the To property from code. Something ...
I have a textbox that is bound (oneway) to a datatable that updates a couple of time a second.
So the textbox value continually reflects changes in datatable.
When I enter the textbox to manually set a value, the binding causes the value to continually be overwritten. How do I stop this?
When I have entred a value (textbox lost focus) I...
This question is for demonstrative purposes. How can I tell my application to uninstall after a certain period of time is over? May or may not be possible. Just wondering...
...
I need to put data from two different datasourses in the same textbox. The text that comes from the first one have to be bolded and the secound normal.
It's there a possibility to do this in WPF?
...
Hi there,
We have multiple project solution based on MS Prism in WPF. For ease of understanding lets take we have project shell, and project usercontrol. The usercontrol project has numerous views for various functions. We have a pop up window in shell project which is called from main shell window, what i want is to load different view...