<CombobBox x:Name="cbo"
Style="{StaticResource ComboStyle1}"
DisplayMemberPath="NAME"
SelectedItem="{Binding Path=NAME}"
SelectedIndex="1">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding Path=NAME}"/>
</Grid>
</DataTemplate>
</ComboBox.I...
I have the following dependency property:
public bool IterationSelected
{
get { return (bool)GetValue(IterationSelectedProperty); }
set { SetValue(IterationSelectedProperty, value); }
}
public static readonly DependencyProperty IterationSelectedProperty =
DependencyProperty.Register("IterationSelected", typeof(bool),
typeof(...
Hi all:
I'm a newbie with wpf , what i want to display the text in one line in wpf textblock.
eg :
`
Text ="asfasfasfa
asdasdasd"
, `
TextBlock display it in two lines default,
but i want it in only one line like this"asafsf asfafaf". I mean show all the text in one line even there are more than one lines in the text
wha...
Does anyone have any experience with the RadWindow wpf control from Telerik?
My problem is that when I open a RadWindow and minimize my application then when I maximize the application the RadWindow is not visible. I can use alt+tab to get the RadWindow in front again, but I would really like to avoid having to do this.
I'm doing the fo...
I want the Tab go forward through each item in a row, and this for each row. But actually it goes through all items in a column, column after column!
In the DataTemplate are 2 Comboboxes (let's say cb1 and cb1) and one TextBox (tb). The actual tab order is the following:
Row0.cb1,
Row1.cb1
...
Row0.cb2,
Row1.cb2
...
Row0.tb,
Row1.tb
.....
I have a normal WPF window, let's call it TopLevel which has a bunch of controls in it, among other things a simple ListView which should log certain events in different elements in the application.
So suppose I have a Grid in TopLevel which contains a bunch of user controls called Task. Each Task has an object associated with them as a...
I have a highly customized Edit control which inherits Richtextbox. I needed a way to bind a Value to this control, so I registered new DependencyProperty, but have trouble to code it like I need.
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register("Value", typeof(string), typeof(XliffRichCe...
Hi guys!
I'm dynamically adding WPF ComboBox-es and I want to be able to select the added ComboBoxes with the 'TAB' key. (Dynamically generate TabIndex or something)
As it actually is:
What I want:
How would you do that?
This is the code:
<ItemsControl ItemsSource="{Binding}" Name="myItemsControl">
<ItemsControl.ItemTempla...
I have a grid in a Viewbox. If shrink the width of my window the grid getting smaller.. but if I shrink the height, nothing happened.
...
We've created a custom theme for a WPF application. The styles in this theme use various bindings. On startup of the application a lot of Exceptions like this occur:
System.ArgumentException occurred,
Message="The requested value \"RecordFixToBottomPrompt\" could not be found.", Source="mscorlib", at StackTrace: bei System.Enum.Parse(Ty...
I've got a datatemplate for a tabcontrol's itemtemplate as follows;
<DataTemplate x:Key="TabItemTemplate">
<DockPanel Width="120">
<Button
Command="{Binding Path=DataContext.DeleteTimeTableCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
Content="X"
Cursor="Hand"...
Hi,
In my application I have a main window composed by some menus and menu-items and a TabControl. In Window.DataContext I reference my ViewModel that contains a property of type ObservableCollection named Items.
My TabControl.ItemsSource is binded to Items property so the TabItems is declared dynamicaly.
<Window>
...
<Window.DataConte...
How can I insert text into a WPF textbox at caret position? What am I missing? In Win32 you could use CEdit::ReplaceSel().
It should work as if the Paste() command was invoked. But I want to avoid using the clipboard.
...
Within a class library I'm writing I have a method allowing the library to go and do some stuff on a different thread which does something like:
public void DoStuffAsync(AP p)
{
this.Running = true;
this.Cancel = false;
ParameterizedThreadStart threadStart = new ParameterizedThreadStart(DoStuff);
...
I have 2 question about xaml editor.
I need to show xaml editor keyboard shortcut like F7 and Shift+F7
How to make default view as xaml editor? When i choosing 'view designer' button from solution explorer, xaml editor and designer window shown. How to set default editor to xaml.
...
I have a custom collection defined in my window resources as follows (in a Sketchflow app so the window is actually a UserControl):
<UserControl.Resources>
<ds:MyCollection x:Key="myKey" x:Name="myName" />
</UserControl.Resources>
I want to be able to refer to this collection in the codebehind, which I expected would be by the x:N...
Is there a way to decompose a MatrixTransform in WPF
in order to remove certain transformations?
I'm rendering an adorner on an item which is the child of a ViewBox.
For testing purposes the adorner draws a box around the item.
Let's say I draw the following:
protected override void OnRender(DrawingContext drawingContext)
{
Rect a...
Are there any free tools for converting a 3D Max model to WPF XAML?
Thank you.
...
Hi!
In user interfaces there is often a need to implement a cancel button when editing some entities. In WPF it would be nice if you could make your view model transactional. I will try to explain a little bit more in detail what I mean:
The view model is connected to the model and exposes data in a way that's easier to handle for the ...
There are multiple places in my WPF application where I need a button that looks & feels like a regular button, but:
It shows a specific icon on it (defined as {StaticResource EditIcon})
It applies a style (defined as {StaticResource GrayOutButtonStyle})
I would prefer to define these attributes in a single location, rather than repe...