Host Html Document in DocumentViewer WPF
I'd like to show an html document in the documentViewer control. How should it be done? I've searched for any examples with no success. Any idea would be apreciated. ...
I'd like to show an html document in the documentViewer control. How should it be done? I've searched for any examples with no success. Any idea would be apreciated. ...
I'm writing a WPF control that dynamically changes its contents depending on what types of Window/UserControl descendants are in its parentage list (part of an experiment with convention vs. configuration). As such, I need some code to run after my control is fully parented (i.e. all the way up to the Window that's being shown). Ideally...
Can somone give me an example why would I need a ViewModel taht contains two sub View models ? and how do I implement this ? ...
I have a datagrid with many columns and I'd like to provide the users with a drop down that allows them to select which columns they can see. I'm using the .net 4 wpf datagrid in a desktop application. Does anyone know of an easy way to accomplish what I am trying to do. Thanks, Richard ...
Hello, I've put an Expander onto a Page. Within the expander there is a Label. After the page is loaded, the expander is not yet expanded. At this point, I inspect the Expander using VisualTreeHelper, I got a structure like this: Expander Border DockPanel ToggleButton Border Grid ...
Hi all, I am developing a custom Image control in WPF .NET 3.5 and Visual Studio 2010. In WinForms the PicutreBox control has the SizeMode property which includes "CenterImage". I want my Image control to have that ability. Is there anyway? Thanks My XAML code: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://sch...
Why DataBinding is not working? <TextBox Text="{Binding Path=local:MainWindow.SearchPlayer, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" /> this is my class: public partial class MainWindow : Window { private Store store = new Store(); private string _searchPlayer; public string SearchPlayer ...
I'm new to DataBinding but would like to accomplish the following: I have a ViewModel which has a collection of objects: CollectionOfStuff Each object Stuff has some properties: Name, Value. In my View, I have a StackPanel with some TextBlocks. I would like to bind the TextBlock's Text property to a specific property. ( I would like t...
Hello, I'm creating a game in WPF and I'm wondering if it is a wise decision to divide game logic and graphics to different threads. My game logic works in steps (one step takes about 30 ms). I'm quite afraid that locks will decrease the performance. What do you think? Does anyone have an experience with that? Thank you! ...
Hello! I'm trying to create a generalized event for my Close buttons, where they have to close the window but before that set focus to the owner window. I don't want to have an event for every file for that, because that'd be pretty unpractical since I have 30+ windows in my application. (So if I wanted to change that behavior, i'd have ...
I am working with a FlowDocument in a RichTextBox and I need to find a way of displaying the block hierarchy. I envisage using something like the WPF GroupBox whereby each block element is assigned a border and a non-editable identifying label. The borders will clearly show which block elements are contained within other elements and the...
I'm trying to do this: imgUser.Source = new Uri(user.Photo); But I'm getting an error that I cannot convert a URI to an ImageSource. Any help? ...
What is the wpf equivalent to ControlPaint.Light? http://msdn.microsoft.com/en-us/library/3wz9t9fy%28VS.80%29.aspx Given that WinForms uses System.Drawing.Color and wpf uses System.Windows.Media.Color ...
I've done this once before but I have forgotten entirely how to do it. How can I have it so an Image can grow a bit within 3 seconds (so it's smooth) on MouseOver? ...
I am rewriting a VB6 form in WPF for my companies internal application. The requirement is to display a collection of objects which can have any property edited. The representation of the data is transposed so that each object is displayed as a column, rather than a row, adding more objects creates more columns: [Object 1]...
'#10eeee' Here's what I'm trying to do: groupRectangle.Fill = Color.FromHex? Thank you for your time! ...
Hello Ok, I have a specific custom behavior for my MenuItems. So I bind the windows from my static class FormsResource and it works perfectly. But, very often, I get an exception "Exception has been thrown by the target of an invocation" in the 3 lines where I have "{Binding Source={x:Static local:foo}}" I can't see the inner exception, ...
I've got a WPF application which starts off with a very small window. Something in the area of 200x100. When certain events are raised from an external source, I add a control to the ItemsControl area of my window. The items control is currently set to use a StackPanel PanelTemplate. What I want, is for the application window to grow wh...
Hi. I have a ListBox that is bound to a ViewModel property of type BindingList(Of MyItem) (lets call it MyTrueList). The MyTrueList property actually looks at another BindingList(Of MyItem) and returns a list where MyItem.MyProperty = true. MyItem implements INotifyPropertyChanged. I also have a button whose event changes the selected i...
Imagine the following: class Repository { private ObservableCollection<ModelClass> _allEntries; public ObservableCollection<ModelClass> AllEntries { get { return _allEntries; } set { _allEntries = value; } } public void RefreshDataFromDB() { _all = new ObservableCollection(GetMyData()); //...