I have a WPF DataGrid. I read a csv file and build an ObservableCollection of objects.
I set the DataGrid.ItemsSource to the Collection. I would like to then force a RowValidation on every row in the DataGrid. If I, playing user, edit a cell, the RowValidation fires, all is well. But the Validation does not fire on the initial load. ...
Is it possible to persist a WPF Control, or any other non-trivial object to a *.settings file in a .NET application? I figured this would be easy since the *.settings file allows me to specify an atrbitrary type for each individual settings, unfortunately, it does not appear to be functioning for me.
What I am trying to do is to persist...
I have a custom TabItem with a close button(denoted by X) on it so it can be closed easily. In this tab i want to put a Image or Border Item, that is centered with the close button in the top left corner
The Control Template for this is
<ControlTemplate TargetType="{x:Type local:CloseableTabItem}">
<Grid SnapsToDevicePixels="tru...
How implement selectable GridView embedded in WPF ComboBox.
...
Hi guys!
I'm using WPF and C#.
I have a problem. I need to create a lot of bindable templated controls in scrollable area (they are all of different types). For example 1000 textboxes, 1000 drop down lists, and 1000 checkboxes.
The problem is that when they are all created it works really slow.
The question is - whether it is possi...
I want to restyle just part of a WPF control.
(Specifically, I want to make the scroll buttons on a ScrollBar bigger)
Now I can do this no problem. I extracted the default style. Made the required tweaks and included the modified style in my application.
The problem is that I have to include the entire control template in the replacem...
Hi,
Currently I am using a sortable listview Which is bind to DataTable, I have a Serial number column which is auto incremented and displayed, Our requirement is when we sort other columns this column shall remain constant and show row numbers in series as in Excel.
I am planning to have a stack panel beside listview and adding Textb...
The Rectangle element has StrokeDashArray which allows it to be drawn with dashes, but it doesn't support rounded corners. The Border control supports nice thick lines with rounded corners, but will only draw solid lines.
What's the best way to achieve a dashed border with rounded corners, with any control?
...
Do you know any controls inherited from the ItemsControl that have horizontal orientation of items?
...
I have a wpf user control which exposes an IEnumerable ItemsSource DependencyProperty. I bind this property to a ListBox control in my UserControl.
I would like to know how I can make my user control work when a CompositeCollection is given. Currently I'm utilising my control like this:
<my:uc>
<my:uc.ItemsSource>
<CompositeColle...
I'm trying to decide whether I should create a simple StackPanel with Buttons on it, or whether I should use the WPF ToolBar class to contain these buttons (I am creating a simple toolbar).
What are the pros and cons to using WPF's built-in ToolBar control?
So far, these are the only advantages I have seen:
The ToolBars can collapse...
Hi, I have this control (see picture). I like when check one option in this control, using styles or with triggers other option enable or disable. This is valid or I have other option for do that?
...
I have developed an application that must be presented on exhibition as advertising. I want it to look more sexy! What tricks do you know that enhance the appearance of your applications?
What are the best design effects the developer can use for its application? I am speaking about: glowing, shadows, maybe forms of buttons, beautiful a...
I need a button-like control that can have a Checked property, so that when clicked it stays pressed.
I had that functionality in WinForms, with the CheckBox control, setting the Appearance property to "Button".
Can someone help me?
...
The easiest way is to implement ButtonClick event handler and invoke Window.Close() method. But how to do this through a command binding?
...
How to make TextBox possible to get only certain values. e.g. DateTime input box with defined format settings.
...
PLease i am having a severe problem in WPF listView Databinding. I bound the list view to a list varsList. and assign the item source of the listView to varsList.But when i change items in varsList they are changed in the list view but the display text of the items is not changed. I tried to use INotifyPropertyChanged but it does not wor...
Hi,
How to select the item in Listbox on click of Enter key in keyboard?
Please reply
Thanks
Sharath
...
Hello,
I have the following code:
void Test()
{
currentImage.Source = GetBitmap();
RenderTargetBitmap rtb = new RenderTargetBitmap(100, 100, 96.0, 96.0, PixelFormats.Default);
rtb.Render(currentImage);
}
This code is supposed to render currentImage, which is an Image control in my xaml to a RenderTargetBitmap.
It doesn't ...
Hi,
I want to show the hotkeys for label, button on screen without pressing Alt Key. For example
Alt + N opens new dialog where N is hot key so I want underline always appears below N.
I am not sure how we can achieve this without Pressing alt key. After pressing Alt Key hot key is shown but we want to show the corresponding hot key a...