Using Release WPF DataGrid I am trying to bind to the property of a CellViewModel (that supports INotifyPropertyChanged of course). I am binding the DataGrid's ItemsSource to an ObservableCollection of type RowViewModel (which is inherited from Dr.WPF's ObservableDictonary) of type CellViewModel and I want bind to a property of a CellVie...
Here's a very simple repro: Start up VS2010 or VS2008, new a WPF project (.Net Framework 3.5 sp1), add an empty page (Page1.xaml) to the project.
The rest code is in MainWindow.xaml.cs:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
TestFrameContent();
}
private...
Hi,
I'm I'm currently making a wpf c# app. I have some storyboards which animate some elements. Please look at the picture below:
This is my grid with some controls after it has been animated. Notice the improper rendering of the text and the rectangle. How can I solve this rendering?
UPDATE: Code request by Rachel:
<TextBlock Heig...
Hello,
i can't get this binding working in XAML.
Binding in c# works:
public partial class myControl : UserControl
{
// get singleton instance
InfoPool Info = InfoPool.Info;
public myControl()
{
InitializeComponent();
// Test Binding
Binding bind = new Binding();
bind.Source = this.Inf...
I have two canvases.
Currently, when I drag a rectangle inside of the first canvas, it also moves the rectangle in the second canvas. I do this using TranslateTransform.
What I want to do is when I drag rectangle (A) to the left, rectangle (B) moves to the right, and vice versa etc.
Is there a relatively easy way to do this?
Chris
...
i would like to make a textblock tooltip conditionally visible.
i have the tooltip defined as:
<TextBlock>
<TextBlock.ToolTip>
<Grid>...</Grid>
</TextBlock.ToolTip>
</TextBlock>
where would visibility property go in that definition? it doesn't seem to like any of my guesses.
there are some suggestions of just workin...
Hi,
I have the following type of setup for my WPF Application.
App.exe
UI.Styles.dll
UI.Controls.dll
Component1.Views.dll
Component2.Views.dll
(and various other parts)
I want to be able to use the design surfaces to pick my control styles - e.g. we have a border that has a "round corner + shading + border" graphical style which be...
Hi.
Here is my code :
<Image x:Name="Layer_22_copy" Height="542" Canvas.Left="16" Opacity="0.522" Source="gammon2_Images\Layer 22 copy.png" Canvas.Top="13" Width="315"/>
how can i change position of this image on Code Behind?
i am new in WPF.
thank you.
...
I have a UserControl with a Template property that I've set up as a DependencyProperty:
public partial class TemplateDetail : UserControl
{
public static readonly DependencyProperty _templateProperty =
DependencyProperty.Register(
"Template",
typeof(Template),
typeof(TemplateDetail)
...
I have a lookless control I've built that has a default style defined in generic.xaml in my Themes directory. I also have the following in the constructor.
static MyControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyControl), new FrameworkPropertyMetadata(typeof(MyControl)));
}
public MyControl()
{
//DoSomeWo...
I have a few frozen columns in my WPF DataGrid. When I scroll, horizontally, the RowHeader is also scrolling, instead of staying frozen. Is there something I can do to keep it from scrolling horizontally? I can provide more information if needed.
...
let's say we are using IValueConverter to format a GridView cell background color depending on its value.
now let's say that value is calculated on a separate thread, after adding the item to the collection.
var args = GetInput();
if (ValidateArgs(args))
{
if (args.Rate.HasValue)
Thre...
I am not a database guy, but am trying to clean up another database. So my question is would normalizing the gender table be going too far?
User table:
userid int pk,
genderid char(1) fk
etc...
gender table:
genderid char(1) pk,
gender varchar(20)
Now at first it seemed silly to me, but then I considered it because i can then have a ...
I have a WPF ListView control for which I am dynamically creating columns. One of the columns happens to be a CheckBox column. When the user directly clicks on the CheckBox the ListView's SelectedItem is not changed. Had the checkbox been declared in XAML I would have added handling for the Click event to manually set the selection. Howe...
I am trying to bind recursively to the children of an item in a TreeView. From what I can see on MSDN HierarchicalDataTemplate is the way to go, but thus far I've only been partially successful.
My class:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DocumentText test ...
I have a TreeView that is binded through a HierarchicalDataTemplate
<HierarchicalDataTemplate x:Key="HierachrTree" DataType="{x:Type src:Ordner}" ItemsSource="{Binding UnterOrdner}">
<TextBlock Text="{Binding OrdnerName}"/>
</HierarchicalDataTemplate>
Thats my TreeView:
<TreeView Name="DokumentBrowser" Ite...
I have struggled for over a day trying to get keyboard navigation to work correctly in a WPF app with embedded list boxes.
Here a description of the layout:
- listbox 1 (repeats unlimited times)
- texboxes 1-4
- listbox 2 (repeats up to 4 times)
- textbox 5
- listbox 2
- button 1
- listbox 1
- buttons 2-9
...
WPF has an ImageSource which has a BitmapMetadata.
However, the Metadata property is read only an the BitmapMetadata is frozen.
So I can I modify the metadata of an image?
...
I've looked at similar questions here on SO and wasn't able to get a solution, so here's my deal:
** I Have the following class: **
public static class ControlSecurity
{
public static readonly DependencyProperty IsSecuredProperty =
DependencyProperty.RegisterAttached(
"IsSecured",
typeof (bool),
...
This has been giving me pain for some time.
I know Prism injects views into regions, however is there a way of doing a similar sort of thing with Cinch, on a view first basis? For example I have a container (effectively a region) which can contain any view at runtime - I don't particularly want to set the view explicitly in XAML as this...