Before I start hacking in a really crude solution, I thought I'd see if someone could give me a little nudge in the right direction.
What I really want to do is let a user select some text in a RichTextBox, click a button, and convert that text into a custom rendered control. Convert it to a Button containing the text they had selected...
I am new to C# and WPF, so please bear with me..
This isn't exactly a Master/Detail scenario, and could be why I am having problems, but generally, I am trying to figure out how to relate two sets of data that are not quite master/detail.
To keep it simple, let's say I have two view/viewmodels for
1) Person
ID, FirstName, LastName
2...
HI,
I am developing an editor using RichTextBox in WPF, i have to implement feature that user can set font of selected Text if some text is selected, if nothing is selected then font should be set for new text.
If i set the font properties(like FontStyle,FontSize) of RTB in later case it will set the properties for whole text, How can i...
How can I create a a custom button that looks and feels like Vista close button? Can any one have a template?
...
Being developer its very hard to designing and Animate the thing... Are there any animation libraries (like WPF themes) available out there for WPF ??
...
I want my application to have a zoomable element which will allow the XAML elements to be viewed at 25%, 50%, 100%, 200% etc, I just need to alter the DPI of the XAML but am unsure how to do this on just part of the XAML (i.e. the element to zoom).
It will work just like the designer view in Visual Studio when you can zoom into the contr...
What is difference between ControlTemplate and DataTemplate in wpf.
...
I have a Menu where each MenuItem in the hierarchy has its Command property set to a RoutedCommand I've defined. The associated CommandBinding provides a callback for the evaluation of CanExecute which controls the enabled state of each MenuItem.
This almost works. The menu items initially come up with the correct enabled and disabled...
Heya
I have a tab control bound to an observablecollection for dynamic tabs as follows:
<TabControl ItemsSource="{Binding AllTabs}" SelectedIndex="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<TabControl.ItemTemplate>
<DataTemplate>
<!--.............. -->
...
Lets say i have a TextBlock thats bound to a DateTime, is there any way to replace the value 0001-01-01 00:00:00 with an empty string?
...
What is wrong with the following ControlTemplate why can't it find the named Brush? I alway get the error Cannot find the Trigger target 'stateBrush'. In my template I would start to animate the background when the state changes to WaitForActive and I want to set it to green when the state changes to Active. Pretty simple. Is my approach...
Please refer to Wiki definitions about 3d modeling, what modeling algorithm WPF 3d use?
Polygon or NURBS?
Thanks
Mike
...
Hi
I have a observable collection as follows....
I used to get designer ignorable error as "type(0) does not support direct content" due to which I implemented ContentProperty as shown below... but now I get two unavoidable errors at the designer as
1.The object 'CustomDataGridColumnCollection' already has a child and cannot add 'Da...
Hi
I'm building a single window WPF application
In the window is a list items (which are persisted in a database of course)
Periodically I need to start a background task that updates the database from an Atom feed. As each new item is added to the database, the list in the UI must also update to reflect this. I don't want this backgrou...
I have a very weird problem with a WPF ComboBox. On one computer (and only one) in our company the WPF ComboBox refuses to respond to mouse events when the ComboBox drop down is open. When the user clicks on the ComboBox to make the drop down appear and tries to select an item, he/she gets no hover effects from mouse over. When the user ...
Hi,
I implemented a fonction in Visual Basic 2008 that takes the content of all the controls from a System.Winows.Form object and return a hash value corresponding to this content. The use of this function is to detect whether or not the user modified the content of the page and determine if I have to display a message box asking to sav...
Hi,
I've got a FlowDocumentPageViewer with dynamic content. The flow document is made of paragraphs, each run in the paragraph contains a word. I'm trying to navigate to a given run, so I got the method which will return me the run I want.
But once I got this Run how can I navigate to it, with automatic page change?
For example I sele...
I have a routed event declared as such (names have been changed to protect the innocent):
public class DragHelper : DependencyObject {
public static readonly RoutedEvent DragCompleteEvent = EventManager.RegisterRoutedEvent(
"DragComplete",
RoutingStrategy.Bubble,
typeof(DragRoutedEventHandler),
typeof...
Background: I'm currently for my University creating some simple apps showcasing the possible educational potential of the Microsoft Surface. Their functionality falls somewhere between a basic demo app and a full-fledged production app.
Our hesitation with using MVVM or some other type of MVC is that, with the exception for the few a...
Hello,
I created a user control which contains a ListView with a custom ItemsPanelTemplate.
<UserControl x:Class="..."
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="thisUserControl">
<ListView ItemsSource="{Binding Source={StaticResource cvs}}"
N...