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 view that contains a ItemsControl with some textblocks inside to display the name and other information. in my window I am adding the view to the window as follows and in the code behind of the window i am binding the datacontext of the view to the view model in the MainWindow Loaded event as follows ViewOwnerSideBar.Dat...
I want to set the CommandTarget of the MenuItem of ContextMenu, in a Style, to the Style target, i.e., the control on which the style applies.
<Style x:Key="AAA" TargetType="{x:Type BBB}">
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Command="{x:Static CCC...
Hello.
A window has a MenuItem binded to a collection, the MenuItem has ItemTemplate, which contains another MenuItem with an attached property using binding:
<Menu Background="Transparent">
<MenuItem ItemsSource="{Binding SomeThings}" Header="Menu">
<MenuItem.ItemTemplate>
<DataTemplate>
...
Hello Experts,
having issues binding a gridviewcolumn to a string array (that probably sounds mad, but I can't seem to do this in the usual manner as I need to concatenate some xml results into one column cell). When I do the binding it simply hooks into the first string and ignores whatever else is generated into my array. The bit that ...
Hi,
I'm new to WPF and have been trying to get the databinding working properly. I have simplified my control a bit for this example. With the code I'm happy with the way that the databinding is working with the textbox but i can't get a similar result from the radiobutton.
Theres two things I'm trying to get the radiobutton databindi...
I have a ListView that uses a GridView and it is bound to an observable collection. On load I populate the collection and it shows up in the UI as expected. The problem happens when I try to manipulate the ObservableCollection later on; if I call RemoveAt( n ) or Clear() on the collection I get an invalid cast exeception that can't con...
B"H
I would like to control the height and width of one of my windows through my ViewModel.
This seems simple enough.
<Window ... Width="{Binding Path=Width}" Height="{Binding Path=Height}" />
but nope. it doesn't work.
It checks the ViewModel's Width but not the Height.
Strangely enough, if I switch the order of Width and Height ...
Is there a way to bind to a Nullable property without using a value converter?
Currently I have this...
<DataGridTextColumn Header="ApplicationKey" Binding="{Binding ApplicationKey, ValidatesOnDataErrors=True, Converter={StaticResource ResourceKey=TestConverter}}" />
Without the converter it thinks of an empty textbox as a String.Emp...
I have two Menu items in a wpf context,
I bind them with command, how do I hide context menu when both items are not available, I mean when both commands cannot be executed?
...
I have a button that loads XAML from a file, creates a control from it and adds this control as a child to a canvas that is part of a template present in the resources of a dockpanel on the window. The window also has a combobox named cboTColour and a combobox named cboBColour which I use to set a simple gradient background on my loaded ...
I have a control in which I am creating a specific Command class in XAML, and it needs a reference to a ContentControl element that is declared later in the XAML. I have the relevant property of the command object bound to the ContentControl via its ElementName, but at runtime, it doesn't seem to get the ContentControl (the command's pro...
I'm struggling to get to grips with WPF, more specifically performing two way binding of an xml file. Should I be using XMLDataProvider or is their another(better) option?
The data is displaying fine but when I change an entry the changes aren't reflected in the xml file.
The XML:
<?xml version="1.0" encoding="utf-8" ?>
<Licence>
...
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 ...
Is this a true statement?
the Set accessor never gets called unless someone sets the .Net property in procedural code. When setting the property in XAML, data binding to it, and so on, WPF calls SetValue directly
(or may be is an old statement)
Thanks
...
Hi all,
I got i issue where the validation appear right but the canexecute don't run again. What i mean is if you put a string in the int field the validation don't go to viewmodel again and the button still be enabled and should be disabled. Someone have a solution for that?
view
<TextBlock Grid.Row="2">Age</TextBlock>
<TextB...
Hi,
In an WPF app, I am trying to use the Aero theme in XP.
I currently have this:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFr...
I am trying to make a ListView filtered, and I found it easy to achieve it.
Both of those 2 methods do it perfectly:
private void ToggleHiddenReleases(bool show)
{
ListCollectionView view;
view = (ListCollectionView)CollectionViewSource.GetDefaultView(ListBoxAll.ItemsSource);
if (!show) view.Filter = (mr => !((ModelRelease)m...
Specifically for data binding and templates, is there a good way to test the performance of my controls in these respects.
I would like to know how much time applying the template and initializing the data binding takes.
I am using both Wpf Performance Suite and ANTS Profiler but neither seems to provide information on these aspects.
...