Hi i have few a single textbox within the the datatemplate for itemscontrol. When i binf the itemcontrols to a observable collection i get two text boxes. But i need to do some manipulations based on each of the text boxes for which i want to find each textbox seperatly using some id.
Can anybody help on how to find a control witin the ...
I had a cursorposition property in my viewmodel that decides the position of cursor in textbox on the view. How can i bind the cursorposition property to actual position of the cursor inside the textbox.
...
Hello,
I've been desperately looking for an easy way to display HTML in a WPF-application.
There are some options:
1) use the WPF WebBrowser Control
2) use the Frame Control
3) use a third-party control
but, i've ran into the following problems:
1) the WPF WebBrowser Control is not real WPF (it is a Winforms control wrapped in WPF). I ...
I have a WPF application which saves its data to XML files in a relative-to-code directory called "Data".
I get the relative path to the Data directory with these methods:
protected string ApplicationPath
{
get { return System.IO.Path.GetDirectoryName(System.Reflection.Assembly
.GetExecutingAssembly().CodeBase); }
}
prot...
Visual Studio WPF editor worked fine all the time. Yesterday, it started complaining about the aforementioned error. I don't recall fiddling with its settings or anything. What's up?
I want to fix the editor and not wade through my code adding Path=. everywhere.
...
I am seeing the weirdest bug with the following code.
I have a PathGeometry to which I added a PathFigure so that I can add LineSegments to it.
This is what I do:
_pathGeometry.Figures.Add(_pathFigure);
_pathFigure.StartPoint = new Point(4, 0);
LineSegment lineSegment1 = new LineSegment(new Point(4, -10), true);
LineSegment lineSegme...
In our current WinForms app, we are displaying millions of records in ListView, using virtualization. Rows are loaded from DB as they are requested. This works well, with good performance.
This is a showstopper for migrating to WPF for us. We need data virtualization in a ListView, like WinForms 2.0 has.
Do you know a decent third-pa...
Hi
I've just started to play with WPF.
Is it possible to have the size of the text of a Label or TextBlock size itself to fill it's parent container?
Thanks,
Mark
...
If i have a collection of elements in a control (e.g. a custom ItemsControl), can i set a property on all the children of that control through a style in a resource dictionary. For instance i would like to set the visibility on all those elements on a certain trigger. Is this possible decoratively?
Cheers
J
...
I am attempting to add a WPF usercontrol to an existing WinForms project and get the WPF UserControl to dock and fill the entire space.
There's a current framework that loads WinForms UserControls into a parent form (into a panel) in response to button clicks. This is where I'm trying to hook in - The WinForms UserControl that's curren...
I'm passing IEnumerable Collection into WPF DataGrid through DataGrid.ItemSource property. But it doesn't update DataGrid when I'm trying to change collection items in a code.
Why?
...
How how do you do this in c#?
<TextBlock Text={Binding MyProperty}/>
Assume the DataContext is set to a class of Type MyClass
...
Hi,
In my application I'd like to have a transparent window but fully opaque children controls underneath. However, WPF makes all children transparent.
See the XAML below. The grid is semi-transparent 50% as expected but the rectangle in it is trasparent not opaque even thought opacity="1". Is there any way to achieve this?
<Window x...
Hi!
Background: I'm using WPF and C# (3.5) and am working on an app that allows a user to view a form/window/usercontrol that's already part of a compiled assembly. When they view it, they should be able to click on any control (buttons, textboxes, even labels), a little popup editor should appear by the control where they can then ty...
Gosh! I hate this. Why it is so complicated?
What I'm trying to do:
I have a form with several UserControls each with a DataGrid. Each grid bind with ObservableCollection through .ItemSource property, everytime when program catches an event, it makes changes in one of the implied collections. But a picture of a grid doesn't update.
...
A simple XY line graph: The X axis will represent the complete range of possible rating percentages, from 0% on one end to 100% on the other. Specifically, the X value will represent our rating cut-off, or the minimum rating a transaction can have before it is no longer acceptable. The Y axis will show values from 0 to the total number o...
Hello,
I have animation on list box items. When the list box item is not visible, ie. scrolled past visible in the listbox the animation seems to stop. When it is scrolled back into view it appears to start where it left off.
Does anyone now how to keep the animation running?
Thanks
...
In my System.Windows.Controls.RichTextBox, I would like to find a TextRange of a given word. However, it is not giving me the correct PositionAtOffset after the first found word. The first one is correct, and then for the next found words, the position is not correct. Am I using the correct methods?
Loop through listOfWords
Word= listO...
Hi,
If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
...
Are there any automated tools that will parse through XAML code and clean out values that are explicitly declared to their defaults?
Example:
<Grid Margin="0,0,0,0" Height="Auto" Width="Auto">
I would expect to be reduced to:
<Grid>
...