I have a WPF ListView, which has a Grid as an ItemsPanelTemplate. I display my items in the correct column and row based on a property of the item. But I would like to put some controls in the empty cells of my grid.
This is a simplified version of my code and xaml:
In the resources:
<ItemsPanelTemplate x:Key="TheTemplate">
<Grid>...
I wanted to know if it is possible to highlight text inside a WPF toolkit datagrid. My aim is to mimic the ctrl+f find functionality of internet explorer inside a DataGrid. With each click of find, the next instance of the searched keyword should be highlighted.
This is the best I have seen on the net.
http://blogs.microsoft.co.il/blogs...
Hi
I have a class which derives from ContentControl and I'm not able to override GetHashCode and Equal method. I get an error
Error 5 cannot override inherited member 'System.Windows.DependencyObject.GetHashCode()' because it is sealed
Is there any way to override this method ?
I need to use Union method from LINQ however I need to c...
In my user interface I sometimes want to put titles above usercontrols.
I want to declare these titles in XAML for future localizability, so I want to keep them out of the datacontexts.
Can databinding fetch them from a property set on the root node of the usercontrol?
I have boiled the problem down to the following code example:
usi...
WPF DatePicker always show 'Show Calendar' by default. I want it to show current/todays date. How do I do that. I tried doing something like the below in the constructor but it won't work,
datePicker.SelectedDate = DateTime.Now.Date;
or
datePicker.DisplayDate = DateTime.Now.Date;
...
Hi all.
I've seen other issues similar to mine, but i haven't seen any that i can apply to make my code work.
So i'm new to MVVM, and i'm trying to get some stuff that's executing in a background thread to update on my UI. What i'm noticing is that the first time bring up the UI, and the background thread executes the first time, if th...
I want to cause all open popups (with StaysOpen == false) to close from code. Basically I want to simulate the user clicking the mouse (which would close the popups) from code.
I don't need to actually simulate the click, I just need the resulting behavior. I've thought about just going through the visual tree looking for popups and c...
I need a toolbar button similiar to the "New Project" button in the standard Visual Studio toolbar. When clicked, it pops up a dialog. However, it also has a small little down-arrow next to the icon graphic that, when clicked, expands a context menu with more options.
Is there a standard control available with this functionality?
...
I have what I think is a very simple databinding question (I'm still new to WPF).
I have a class (simplified for this question)
public class ConfigurationData
{
public int BaudRate { get; set; }
}
In MainWindow.Xaml.cs I have a private member variable:
private ConfigurationData m_data;
and a method
void DoStuff()
{
// do...
I'm probably searching for this the wrong way, but:
is there any way to get the resulting value of a binding through code?
Probably something glaring obvious, but I just can't find it.
...
Hi All,
I am working on creating a WPF solution which uses MVVM pattern to load searched items in a search control asynchronously. The search control which is a WPF usercontrol is created with a textbox to enter search text and search button and a hidden listbox which would be visible when it loads the searched items list in it. This us...
When you create a XAML page in Silverlight or WPF, the system creates a top level container called "LayoutRoot". Is there anything special about this name, or can the top level container be called anything (or even nothing)?
...
I was pulling out my hair trying to figure out why the normal Dispatcher.Invoke command did not work for redrawing my window, but now I the issue seems to be related to the content being disabled. I'm using the Dotnet 4.0 full framework.
If i use
private void DoSomething()
{
HandleBusyEnableDisable(false);
DoSomethingThatKeepsItB...
I'm saving a BitmapImage to a byte[] for saving in a DB. I'm pretty sure the data is being saved and retrieved accurately so it's not an issue there.
On my byte[] to BitmapImage conversion I keep getting an exception of "System.NotSupportedException: No imaging component suitable to complete this operation was found."
Can anyone see w...
We are building a new vision inspection system application. The actual inspection system needs to be c++ for a number of reasons. For that system we will be using Boost & Qt.
For our UI, we are currently looking at using WPF/C# for the UI and SQL based reports. The complicating factor that UI has to run both local on the same box as ...
Is there a way to apply an underline text decoration to one character only in a TextBlock (or any amount less than the full block)?
I have some text that I want output as "this worf is misspelt" and have the f in worf underlined.
I know you can do:
TextBlock47.TextDecorations = TextDecorations.Underline;
but I don't want the entire ...
I got a ListView Like the following. The User is supposed to select some Items and dragDrop to somewhere else. This does not require CTRL+click which is good. but after all the selection are made, when I try to start drag, the left click un-selects teh item that got clicked. How can I make this behave like windows explorer, so the select...
I'm trying to set a button's event to change a grid's visibility using just XAML. I'm pretty sure I should be using an EventTrigger, but I couldn't get that to work so my most recent attempt is to create a DataTrigger that is bound to a field in the view-model:
<Style x:Key="PersonalInfoGridStyle" TargetType="{x:Type Grid}">
<Style....
I am trying to render 3D object using the below code.
But when I run the application, nothing is displayed. It seems to be blank. Am I missing anything?
<Page x:Class="SampleWpfApplication.DemoPage3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="DemoPage3"...
I have a user control that hosts other controls. The way I implemented this is via data templates that define the control that should be associated with a specific view-model. These view-models have similar properties and interaction triggers. Please see XAML snippet below.
The problem with this approach is that I would have to copy-pas...