I'm working on a word processor-type app using the WPF RichTextBox. I'm using the SelectionChanged event to figure out what the font, font weight, style, etc. is of the current selection in the RTB using the following code:
private void richTextBox_SelectionChanged(object sender, RoutedEventArgs e)
{
TextSelection selection...
Is there a way to stretch a WPF Calendar control horizontally? The control will let me set HorizontalAlignment="Stretch", but that has the same effect as setting the property to "Center". It changes the width of the control, but the displayed calendar remains the same size in the center of the control. I'd like to stretch the displayed c...
I'm using Fluent ribbon in a MVVM application. For each tab item I associate a view and a view model (set a new DataContext). How can I change the view and the view model (DataContext) each time when the selected tab item is changed ? It would have been nice to have an event that fires each time a tab item is selected, like Microsoft Rib...
I thought a simple problem like this should be no-brainer but after hours of searching I'm still not able to fix this one.
I'm probably not thinking the WPF way because it looks I'm the only one on internet with this problem :)
Here's the problem.
I'm having a fairly simple listview with a datatemplate (leaving some none-relevant code o...
Hi,
I have a user control. When the user drags over items onto it, I need to present him with 2 options, depending on his choice I need to proceed with the next step, I could sho him the option after he drops the items, but this will involve an extra click on the user part, I was wondering if there are any techniques in wpf or ways to sh...
I have a Grid that looks something like the simplified example showed below. There are more elements in the grid but the problem is about the ListBox and the TextBlock.
If the TextBlock (or any other element with the same grid-configuration) has a ColumnSpan of two, every Update to an Item of the ListBox is very slow. I have looked with...
Hi,
I have a WPF Datagrid binded with list of interface objects.
Consider, ClsEmployee class implements I_Employee interface with properties Empl_Id, Empl_Name, Department, Address and City_name.
List _emplList;
consider, _emplList has 10 items.
dgEmployeeGrid.ItemsSource = _emplList;
Question:
Now, if the user clicks on a button, t...
Hi all,
I am creating a custom control in WPF, it is the highly unoriginal example of a stock ticker that I am deriving from the Control type. My question is: Are there any recommnded design patterns for controls themselves (as opposed to the app)? I am using MVVM for the application as a whole but just wandered if it is good or bad pr...
Is there way to capture and print out all of the requests and responses from the web browser control including asynchronous requests?
...
Hi Experts,
I have a combobox on a window in wpf and i am trying to capture the down arrow key of this combobox but i am not able to do so. The following is the only code i have for the combobox.
<ComboBox Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="comboBox1" VerticalAlignment="Top" Width="120"
Previe...
I am creating a window that uses a WPF calendar to browse documents created on specified dates during the month shown. When the calendar changes month, I search a database for all documents created during that month, which I use to create a list of dates during the month that have documents.
In the Calendar control, I want to boldface t...
i would like to make a textblock tooltip conditionally visible.
i have the tooltip defined as:
<TextBlock>
<TextBlock.ToolTip>
<Grid>...</Grid>
</TextBlock.ToolTip>
</TextBlock>
where would visibility property go in that definition? it doesn't seem to like any of my guesses.
there are some suggestions of just workin...
I'm working on a user control right now in which I have a path as part of the control. There are 3 possible paths I might want to display based on the values of certain data. To determine which Path I want to use, I have a value converter that takes in the data and returns a number to represent which of the paths I should use.
My first ...
I am totally new to WPF, I have created a simple WPF app that lists whole drive structure (folder, files) to a TreeView, since this process takes a while I tried to use a thread to run the GetFolderTree() method and prevent the UI from becoming unresponsive, however I am facing some problems, I have created a Class named FolderBrowser wh...
Update: using Expression Blend 3
I'm trying to style the IsPressed & IsEnabled(false) property triggers for a class of buttons in a WPF application.
Here's a UserControl with a Button using the style...
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/20...
How can I raise DataObject.Pasting event from my code?
...
Hi Experts,
I am trying to bind an observable collection to a user control but it is not getting updated on user change but it is getting updated when the user control is changed through code. Following is an example i tried. It might be a bit long but it is working so you can copy and paste the code as it is.
Please see my question a...
I have been using Expression Blend to copy the default templates for WPF 4.0 controls. I am writing a CodeProject article on extending WPF controls, and I would like to recommend a free tool as an alternative. What would you suggest? Thanks for your help.
...
We have an app in progress/development using the Office Fluent UI ribbon control library. It seems that the new RTM release of the Microsoft Ribbon for WPF is going to be the standard for the Microsoft libraries (at least for the next month or so).
Can we install the Microsoft Ribbon for WPF safely on our dev boxes and begin transitioni...
Hi,
My application has to support multiple languages and should be able to switch the language on run time. For that purpose I am using LocalizationExtension from codeplex (http://wpflocalizeextension.codeplex.com/) I am using Ribbon Contorl in my application. I am creating ribbonCommands as window resource and Binding the LableTitle an...