I have a WPF ListView control containing a number of RadioButton controls using data binding. I'd like the first RadioButton in the group to be checked by default, preferably set in the XAML rather than programmatically, but haven't managed to achieve this.
My XAML for the control is:
<ListView ItemsSource="{Binding OptionsSor...
I set the Background color of the tabitem in the xaml to RED, but when i run it and hover over it or select it it changes back the the default greyish looking. It only shows correctly when the other tabitem is selected. How do i keep it RED all the time. Thanks!
...
I want to make 2 different styles for the ToolBar control: One is based on black buttons and one on silver buttons. But I can't figure out how to apply my button styles to its own toolbar styles. The following only allows one style for the buttons:
<Style x:Key="{x:Static ToolBar.ButtonStyleKey}"
BasedOn="{StaticResource Black...
I would like to add a control to my app where the user can browse his local file system and select a directory. I would prefer to host this control on my main app window, and not do this via a pop-up dialog.
...
I have a WPF ListView with a collection of RadioButtons. I want to set the GroupName of the child controls to be bound to a property on the parent data context. At the moment I am doing this by duplicating the property in each of the children's data context but that can't be right.
My XAML:
<ListView ItemsSource="{Binding OptionItem...
Hi
I am designing a custom virtual keyboard based on stack panel and including bunch of buttons in it for multi touch purposes. The keyboard will be defined as a resource in order to be used on different windows,canvases etc. My question is that, how to bind the focused text box to this custom virtual keyboard?
Best regards.
Celil
...
I have a HeaderedContentControl that contains a TreeView.
<HeaderedContentControl Header="Steps" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TreeView Name="WizardSteps" ItemsSource="{Binding WizardSteps}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<!-- Hierarchical data templates h...
Just starting out with C#, so this may be overly simple that I keep overlooking it...
In the main window I have a stackpanel, named targetDocArea, that will hold controls.
Based on user input, controls appear in the panel like so:
var htmlView = new System.Windows.Controls.WebBrowser();
htmlView.MinHeight = 200;
htmlView.Height = deskHe...
Hi,
I have a listbox in which I am displaying the records from the database. Its coming one after the other in a single column. How to put the records programitically as 3 rows and 3 columns i.e. 3 records in a row, after that 3 records in a row. Kindly suggest?
Thanks.
...
I set the Background color of the tabitem in the xaml to RED, but when i run it and hover over it or select it it changes back the the default greyish looking. It only shows correctly when the other tabitem is selected. How do i keep it RED all the time. Thanks!
...
I have a UserControl that I want to participate in data binding. I've set up the dependency properties in the user control, but can't get it work.
The uc displays the correct text when I call it with static text (e.g BlueText="ABC") . When i try to bind it to a local public property, it is always blank.
<src:BlueTextBox BlueText="Feel...
I have a requirement for my textblock to have a character gap of 75 and a border line of 2 pixel. How would I achieve this?
...
How can set "AllowUserToResizeRows" property in Header listview wpf?
it was in Windows.Forms thus :" dataGridView.AllowUserToResizeRows = false "
My xaml code is :
<ListView Margin="2.5,0,0,32" Name="listView1" ItemContainerStyle="{StaticResource myItemStyle}" SelectionMode="Single" HorizontalContentAlignment="Center" VerticalAlignmen...
I have a TabControl which is having 2 TabItems. Each of these two TabItems is having a listbox. On the SelectionChanged event handler I am setting ItemSource property of the appropriate ListBox to null and populating the other one with a Collection. Now when I keep on selecting each Tab there is a memory spike. What may be the possible r...
Just wondering how to add a DataGrid context menu to a DataGrid? I want to be able to right click anywhere on the DataGrid. Can someone please provide a simple hello world example (just popup messagebox or something)?
Thanks!
...
Quick 1 sentence summary: I wrote a demo app [download src here][1] that doesn't properly display sample data in the Visual Studio Designer and I need help.
After 6+ years developing in C# and WinForms, I've decided to use WPF in my current project. I've written a small demo application to teach myself and experiment with WPF (you can s...
I have a data-bound ListView in WPF with the ListView items being rendered as RadioButtons. I want to use a GridView to display these in a grid. I can find numerous examples for using a GridView where the data is to be displayed in columns (with different item properties in each column) but I want an entire child item in each cell not ...
Hi,
I have a textbox and inside its lost focus event, I show a new window and give the user choices,
I also have a button below the text box.
Now, when I change the value of the text box..and click the button (while the cursor is still inside the text box...) the lost focus event gets fired... but as I show a modal window dialog, the ...
Hi,
I have a textbox and have an onlostfocus event on it.
Inside the lostfocus method, is there a way I can determine if the user has actually changed the value in it?
i.e how do i get hold of any previous value in it?
Thanks
...
i have a TreeView that is bound to a collection, I want to expand a treeViewItem automatically from a object i used ItemContainerGenerator.ContainerFromItem, it returns always null the ItemContainerGenerator.Status is NotStrated i call StartAt method i have an exception "unable to call "StartAt" when the generation of content is bei...