I have two listview's, one of which accepts Drag/Drops of files, to list the file names. What I want to do is to have the second listview create a custom object, based on the filename of the item in the first list view.
I have the second list views ItemSource bound to the first, and whenever I drag a file into the first, it will show in...
I have a BitmapSource. I save it to a png like this:
PngBitmapEncoder enc = new PngBitmapEncoder();
enc.Frames.Add(myBitmapSource);
enc.Save(fs);
How can I save it without any alpha channel?
...
Hi All,
Here I am trying to assign the datasource (using same code given in the sample application) and create a graph, only difference is i am doing it in WPF WindowsFormsHost. due to some reason the datasource is not being assigned properly and i am not able to see the series ("Series 1") being created. wired thing is that it is worki...
I have a ChildWindow control which has several TextBoxes, and a Button in it,. When I click the Button, I want to change the "IsReadOnly" property of one of the TextBoxes. In my button click event handler, all of the TextBox objects are "null".
Can someone explain why this is, and how I can access them?
Thanks for any help.
Edit:
<...
to date I have created and setup bindings and dependencies between controls and other objects when they are located within the same directory or within the same xaml document.
Now I have created a usercontrol which is located in a directory of my project called "Controls" this control is then loaded within the main xaml document using ...
Can WPF bind to a generic class I created?
It is basically Class<T> where T:MyInterface
Can I Bind to Class<T> and use MyInterface to Bind It?
...
Hi all. I'm trying to create a JPG from part of my WPF Applications. Like a screenshot, only of individual UI Elements. I started here: http://www.grumpydev.com/2009/01/03/taking-wpf-screenshots/
I am using his extension method, which essential allows you to get a byte[] with UIElement.GetJpgImage(). This can then be written using a...
Hi all. I'm trying to make my application force a theme - this is straightforward as shown here: http://arbel.net/blog/archive/2006/11/03/Forcing-WPF-to-use-a-specific-Windows-theme.aspx
However, I don't know what theme I'm using now. I'm using the Windows XP default theme, whatever that may be. That article says
It's important ...
Hi
I created a new DataGridCell style for my wpf datagrid (Red Border brush). When I scroll down vertically the selected cells disappear which is ok. When I scroll up I see the selected cells but few of them missing their style and it appear in wrong cells.
It look like the data grid remember the selected cells but "forget" their style...
I want to take a snap of the visual tree of a custom wpf control when the user clicks a button in a toolbar. The control is bound to a viewmodel.
I have a BitmapSource dp in the custom control holding the snapped image which is bound to a property on my VM. The BitmapSource dp on the control is updated via a custom command on the contro...
I have an application that consists of a WPF UI with an "infrastructure" layer below it that has some references to various services with data. I've got a class, Updater, that has a couple properties that represent the data to be consumed by the UI layer. This updater has a Systems.Timer function such that every minute or so, it makes ...
I am setting context menu on a wpf window which is set to be bottom most. The issue is when I open Contextmenu the window lose its bottom most position and come on top of other windows. Is there are way to open a context menu but keep window bottom most.
...
Using ScatterView control shipped in Windows Touch WPF. I want to prevent inertia from happening on a scatterview item. But I still want to allow user to move, scale and rotate the item.
So I try this...
ScatterviewItem svi = new ScatterviewItem();
svi.ManipulationDelta += OnManipulationDelta;
...
void OnManipulationDelta(...
I am attempting to get the data from a wpf password box into a secure string. How is that done?
what i have so far:
SecureString pass = new SecureString();
pass.AppendChar(pbox1.Password);
this of course does not work, so how would I get the password data without creating a regular string?
...
My Customer has a property called SaveCommand.
My form is data-bound to an instance of the Customer object.
Using XAML, how would I bind Customer.SaveCommand to the form's save button?
...
i've got a INotifyPropertyChanged-abled class and thought it would be a good idea to use:
<Image Source="{Binding myfilename, StringFormat='FixedPath/{0}.png'}" />
so whenever i would change myfilename in source, i'd get the corresponding image in my wpf gui.
it compiles. but in the console i get the error that a TargetDefaultValueC...
I apologize in advance if this is vague...What is the best or most practical way to implement lists of custom types for MVVM? I had someone tell me that for each type I have I should have corresponding List of it. For example, if I have a Customer class I should also have a CustomerList class whose base class is List and within this c...
I have added a default menu control to my user control. I need to style the menu to remove the left margin containing the space for the icon or checkbox. How can I do this?
XAML:
<Menu>
<MenuItem Header="MyMenu" FontSize="10">
<MenuItem Header="Options..." />
<MenuItem Header="About" />
</MenuItem>
</Menu>
...
Should IDataErrorInfo.Error check everyShould IDataErrorInfo.Error check every property? Or can I trust any clients to call IDataErrorInfo.Item on every property?
...
I'm handling drag and drop events in a TreeView using PreviewMouseDown, PreviewMouseMove and PreviewMouseUp, however, there is an issue.
In my PreviewMouseDown handler, I set everything ready in case there's a drag started (detected in the Move event), however I set e.Handled = true. This means that standard selection events don't get g...