I have menuitems with icons and when it is disabled the icon remains the same. Is it up to me to supply a disabled icon and, if so, does this also apply to menuitems bound to a command?
...
Hello,
first this is no rant although its worth alone to put it on a blog...
When I type very fast - having roughly 260 chars/minute - WPF`s RichTextBox starts swallowing chars and I have to stop writing that fast a => a.IsAnnoying = true;
The same in a VB 5.0 RichTextBox fast as hell.
Why is WPF again so great for? Customer satisfac...
Is there a simple way to invert a WPF GridView so that items are bound to columns instead of rows? Or would it be necessary to write a custom view mode?
...
Hi
I'm trying to create a "gadget" like application using WPF. The goal is to get the same behavior as a normal Windows 7 gadget:
No task-bar entry
Doesn't show up when you alt+tab windows
NOT always on top, applications can be on top
Visible while performing 'Aero Peek'
Visible while using 'Show desktop' / Windows+D
I've been able ...
I am writing a WPF chart and use Visuals for performance. The code looks like:
public class DrawingCanvas2 : Canvas
{
private List<Visual> _visuals = new List<Visual>();
protected override Visual GetVisualChild( int index ) { return _visuals[index]; }
protected override int VisualChildrenCount { get { return _visuals.Count;...
In our application we have a very large set of data that acts as our data dictionary for ComboBox lists, etc. This data is staticly cached and keyed off of 2 variables, so I thought it wise to write a control that derived from ComboBox and exposed the 2 keys as DPs. When those 2 keys have proper values I set the ItemsSource of the Comb...
I have buttons on a toolbar in WPF.
When I do the XAML:
<ToolBar.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Width" Value="21"></Setter>
<Setter Property="Height" Value="21"></Setter>
</Style>
</ToolBar.Resources>
None of the buttons on the toolbar set their sizes accordingly.
I have to go to ...
Hello,
Is it possible to programatically create a new panel within a current document that contains duplicate elements?
For example when the window loads I have a grid (one row) with three text fields, Fname01, Lname01, and DOB01, I would like to have a button that when clicked would append a new row to the grid with three new fields (F...
Hi I have this snippet
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
}
private void ToggleButton_Checked(object sender, RoutedEventArgs e)
{
switch ((sender as Button).Content.ToString())
{
case "UserControl 1":
AddItemToContaine...
Hi,
My WPF test app (very simple, just one window) is using a 3rd party managed dll (say X.dll). This managed dll uses some unmanaged dll's .
So lets say I write a small wpf app which just references X.dll. And in the window's constructor I access something inside X.dll (ie. in some namespace in X.dll). On doing this i dont catch any ex...
I am trying to create a ControlTemplate which will merge 2 IQueryables (and some other things) into a CompositeCollection.
I am having issues getting the CollectionViewSource.Source to bind correctly to the template. It looks like TemplateBinding in the Resources section is not supported. What is the best way to get around this limitati...
Hi All,
I have an application that uses WPF Composite, and I have an issue. I've got a big database that is attached to the application and I need it exposed to different modules as part of the application.
What is the best way to expose my Entity Framework model to all my different modules and views inside them? Do I have one EF mode...
I can set the relationship between View Model and view through following DataContext syntax:
<UserControl.DataContext>
<view_model:MainMenuModel />
</UserControl.DataContext>
And I can also set the relationship between View Model and view through following DataTemplate syntax:
<DataTemplate
DataType="{x:Type viewMode...
Hey all
I am using a wpf slider to display the time line in a video player. I need to add an ItemControl of some sort on top of this so that I can add buttons on the time line on certain positions in the time line (the buttons will hold their own position relative to the parent ItemsControl).
What ItemsControl container should I use wh...
I want to make a splash screen, which cannot be clicked/selected by mouse/UI.
As such how to I apply
Win32.ExtendedWindowStyles.WS_EX_TRANSPARENT
on Windows Presentation Foundation Window?
In Forms I'd do this.
...
Hi,
I am hoping for some guidence. I have a wpf application that contains a window (Window1) and a page (Page1). The page is inside the window using a frame.
I have a button within the page that I want to be able to press and pass a string value back to mainwindow and display it within a label.
Can anyone help with a basic example as I...
I've a Image control inside a ScrollViewer and TIFF file set as its source. Image displayed with black overlay for some height values (in range of 40% to 60% of image's actual height). I find it only when Stretch value is set to anything other than "None".
<ScrollViewer Grid.Column="2" Margin="5" HorizontalScrollBarVisibility="Visible" ...
I have a class library (mylibrary) which has a resource called "close.png". I used redGate reflector to confirm that the resource is actually present in the dll.
Now i use mylibrary.dll in a project where i attempt to extract this "close.png" resource like this :
BitmapImage crossImage = new BitmapImage();
crossImage.BeginInit();
c...
I have defined a default binding in my style.
For example I have configured the visibility binding of my button so that it must not be visible if the relative command can not execute.
This is my default binding behavior.
Apart from my default behavior, every view can customize the buttons it uses with another visibility binding.
I w...
I have a Grid which contains an Image in one of its columns. The image itself does not have any Width or Height set, but its size is correctly controlled through the ColumnDefinition set. From this I would assume that the image controller actually has a Width and Height set, but when I try to bind another element to its Width and Height ...