Background:
I am generating the UI for a settings page. The settings are stored within a Dictionary as the settings will be different for each object in question.
Problem:
The ScrollableHeight of a ScrollViewer is not acurate to the size of the content. When the content of the ScrollViewer changes the ScrollableHeight is not reset, ...
I'm trying to improve the graph drawing control that comes with Graph#. It's good, but things get out of hand when you start dragging nodes around. This is my first encounter with WPF, so this is probably a newbie question. :)
I have the GraphCanvas control which has nodes and edges on it. They can be dragged around which changes their ...
After asking this question I realized that perhaps I should have asked a more generic question. So, here goes:
In WPF, I'm creating a custom Panel-derived control. To that control I would like to add horizontal and vertical scrollbars and control them myself (get & set min/max/value/pagesize). How can I do this?
This is my first encoun...
I'm trying to get an image to display with one of the colors replaced with a white alpha so that I can layer it on top of other images. I've got it so that I can change colors easily enough, but changing it to be transparent is eluding me. Here's my code, using C# and WPF.
private void SetAlpha(string location)
{
//bmp...
At several points in my current application, I have an ItemTemplate such as the following:
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ToggleButton Ma...
Hi,
This might be a crazy question.
Suppose a collection that has a a few entries, some of them are just empty string. Is it possible to write the ItemsControl to use different DateTempalte if the content is empty string?
Thanks a million times
...
Hi all,
Been thinking about this for hours now. Im building a simple slideshow application, where the user creates slides through a web application and publishes them to a wpf "player". The user is allowed to create two types of slides one based on html and one based on xaml (thought this would be easy).
When i get the slide to the play...
I have the following class,
internal class PageInformation
{
public string Name
{
get;
set;
}
public Uri PageUri
{
get;
set;
}
}
How can I use it in XAML (a page) and assign values to its properties?
Update-1:
I added xmlns attribute in page tag
<Page xmlns:local="clr-namespac...
Hi i have a FlowDocument which i want to fill the entire width and height of my window. I have tried using the flowdocumentpageViewer (no luck) and are now using a documentpageview. I still cant get it to dock/fill the entire space, its just sitting in the middle, in the minimum size it can create (does it make sense?)
here is my code:
...
I’m working on creating a full-screen 3-D app (based on Johnny Lee's Wii head tracking app) with some augmented reality features, and it seems that WPF is too slow to render even the simple models I’m using at a reasonable frame rate. I think the problem is that I need to change both the view and projection of the camera on just about ev...
Basically, I have a Grid with content that I want to reuse, the only difference being the functions called by clicking the buttons. I've added it to the ResourceDictionary, the plan being that I could simply set the content of a Page to that Grid, then override the function in the codebehind to do what I want. Unfortunately, I've run int...
I'm very new to WPF and trying to port an application from VB6 to C# and XAML.
What I need to do now is create one big image out of a number of small ones, arranged like a series of "tiles." Some of these smaller ones will have overlays superimposed on them.
In VB6, accomplishing both the tiling and overlaying would simply be a matter ...
Hi, I'm stumped here. I have an observable collection that holds business objects. I have it bound to ItemsSource of a ListBox. I am updating the X and Y of my object and it is being displayed correctly in the UI during runtime as it is bound the the Item top and Left. But, here is where the problem is. I have also bound some data to be ...
I have a bunch of custom classes (NumericTextBox and NumericConverter in this case) which I used successfully without any warning or error for a while.
Now I just hit a problem where if I use the converter in the binding on the NumericTextBox inside a DataTemplate, the binding is broken.
But if I use just the NumericTextBox or just the N...
I'm having an issue when triggering a storyboard from the code behind. I've just changed the storyboard to use a dependency property, which works, but only after the calling FindResource() twice. I build the dependency property using a UIPropertyMetadata object to set the initial value which appears to work. Does anyone know what I'm doi...
I want to restrict the my RichTextBox will only accept plan text, i. e user cannot allow to paste the image in it.also want to set maximum number of character allow in RichTextBox.
How can i achieve this.?
...
Background:
I have a List<T> in my ViewModel defined as...
private List<FooBar> _fooBars;
public List<FooBar> FooBars
{
get { return _fooBars; }
set
{
if (value == _fooBars) return;
_fooBars = value;
OnPropertyChanged("FooBars");
}
}
FooBar is defined as...
public class FooBar
{
public st...
How do i databind a listbox to a List that i have in the containing window's class file? I looked and there's an ItemsSource property that i can set but i'm not sure if this is what i want, nor am i sure what to set it to.
...
Has anyone worked on capturing screen to video stream (to store in local file or send to network)?
I understand how it can be done, and have several test solutions working - but we have trouble achieving decent performance. We need to capture about 4 megapixels screen space of changing text and vector graphics, on a computer where CPU ...
I know about using _ instead of &, what I'm looking at is all the Ctrl- type shortcuts.
Ctrl Z for undo, Ctrl S for save etc.
Is there a 'standard' way for implementing these in WPF applications? Or is it a case of roll your own and wire them up to whatever command/control?
...