I define custom look for Button control in resource dictionary:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Button" x:Key="BaseButtonStyle">
<Setter Property="Background" Value="Blue"/>
</St...
Hi,
I am using a XamDataGrid to populate say books. I want to ADD/EDIT/DELETE books from XamDataGrid and the change should reflect in the database. i.e. when I edit the record in XamDataGrid changes should be stored in the database similarly for Add and Delete. Can anyone please give me sample code or explanation how to achieve this?
I...
I've got a FlowDocument and assigned a name to one paragraph.
I want to edit the content of a paragraph (which is just one ordinary string btw.).
How to do this?
...
I've got a UserControl which has an opacity of 0.
At that state it shouldn't be clickable.
How to disable/re-enable it?
...
I have a FlowDocument with two Sections.
One is named 'Inhalt'.
Trying to replace it with another Section doesn't seem to work:
InfoBoxAuditorium.Inhalt = InfoBoxAuditorium.Resources["DokumentWohnzimmer"] as Section;
What am I doing wrong?
...
I am DataTemplating a listbox's itemsource to display a series of comboboxes. I want to give the 'DisplayMemberPath' of the combo to a property, which is in a different source than its own 'ItemsSource'. (Assuming DisplayMemberPath is just a string representing name of a property, I am getting this from the user). I have achieved this wi...
Hi all,
I've just created my first WPF application (3 calculators inside 3 different tabs).
The entire application has been built using widths/margins/paddings as static values, since I originally didn't know that dynamic values can be used by just putting an asterix after the value.
The client has come back to me though and has asked...
I'm thinking of CTR-Clicking each item to build up an array to add.... or even more fancy, drag select an area of items (don't think this is possible tho).
I'm aware of the custom events such as ItemDoubleClicked, but is there something like ItemSingleClick, where I can check if the CTR/SHIFT key is being pressed before executing an act...
I'm trying to solve the following problem on a WPF datagrid:
I've templated the DataGrid items to contain a button - when clicked, it displays the RowDetails for the grid. I'm having trouble getting that button styled the way I want. Specifically, I want it to appear as a "hyperlink" with a small plus-sign icon next to it. When clicked ...
how would I access this WPF XAML resource programmatically?
<Grid.Resources>
<Style x:Key="lineDataPointStyle" TargetType="chartingToolkit:LineDataPoint">
<Setter Property="Background" Value="DarkGreen"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property...
I want to give all images inside a FlowDocument rounded corners.
Whats the easiest way to achieve this?
...
Hi,
i'll try to create a hierachical context menu using databinding. The XAML code looks like the following:
< ContextMenu>
< MenuItem Header="MoveTo">
<MenuItem.Resources>
<!-- Display files as menu items -->
<HierarchicalDataTemplate DataTy...
In my application I have some controls that logically belongs together and is reused many places in different windows. The controls are always placed inside a grid.
Instead of copying the controls (and the code behind) each time I want to use them, I would like to define and maintain them in a single xaml file as a single UserControl.
...
I would like to create XAML-only workflow then "upload" it to Sharepoint 2010 and manually execute it as I would run it in Windows Workflow Foundation.
So far I know I can package my workflow and deploy it as WSP to Sharepoint and then start it either manually or on an event trigger, but this scenario doesn't suit my needs unfortunately...
I have this very simple Combobox in my XAML:
<ComboBox Name="cmb1" Width="200" Height="23" ItemsSource="{Binding}" />
and this is my code behind:
public class Test //: System.Windows.DependencyObject
{
public string Name { get; set; }
public override string ToString() { return Name; }
}
public MainWindow()
{
InitializeC...
I have a custom look-less control derived from Control class. It's template is defined in Generic.xaml file. Now I want to add some UI stuff to it (mostly brushes) and want to do that in separate resource dictionary, and then access those stuff from the code-behind feil (*.xaml.cs).
See bellow:
Generic.xaml (fragment):
<ResourceDiction...
Hi, I've started a new job this week and am trying to get my head around this WPF stuff.
I've gotten to a point where I'm trying to add a ComboBox to a UserControl, and to populate it from a collection which exists in code.
I've been getting along pretty much on monkey-see-monkey-do coding for the most part; copying and adapting existi...
When I write a <period> into myTextBox I want a myOtherText.Focus to be performed.
Anyone know a way of doing this in xaml code?
Edit:Agree that the orginale solution I asked for was a little hacky. So I changed the question. :)
...
I have a control which expands when IsMouseOver is set to true using a trigger. Within that control, there is some textboxes that have some basic validation. My problem is that when a validation error occurs and the user mouses over the Red border around the textbox (almost guarenteed to happen as user moves the mouse to center of textbo...
Please consider the following XAML code:
<ListBox Name="listBox1" ItemsSource="{Binding}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Border Name="border1">
<TextBlock Text="{Binding}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
and we assign a simple arr...