I have a Window shell that is basically:
<Window>
<ContentPresenter Content="{Binding}" />
</Window>
Injected into the ContentPresenter at run-time are UserControls. What I want to be able to do is write:
<UserControl Window.Title="The title for my window">
[...]
</UserControl>
So that the Window title is updated using the User...
I have public class MyControl : ContentControl in wchich i have definitions of control and events corresponding with it.
This control works fine, but when is disabled it looks still like enabled. I would like to do something like if control.isenabled = false then control.opacity = 0.5; How can i do it?
...
Hi,
I have a WPF page used as an input form which contains a number of controls on one side, and a flow document reader on the other.
I want to set the content of this document reader to a specific part of a flow document which is loaded when the form is loaded, (via a loaded event).
I have found an article explaining how to do this,...
Hello,
I need to render some rich text to a pdf. The difficulty is, i need the text on the pdf to look exactly like the text in the WPF RichTextBox. The pdf renderer i'm using renders according to html, so converting from richtext to html sometimes causes lines to wrap/break at different points. Is there any way to get the text from t...
If have a control that acts like a record selector from a database, say, for example, customers.
The control must act in certain ways allowing the user to type the name, the alias or the code of the customer, and the control will select the correct one, or offer a list of possible candidates, and other behaviors.
I have tried to inheri...
I have a WPF Custom Control inherited from Button.
How do I programatically get the custom control to capture the Click Event (so that I can record the action and do some internal work)
(basically I want to catch the event and set a certain property to a certain value) and make this part of the classes standard functionality.
From my ...
Suppose I have 2 tabs with parameters to be set and two buttons under them, one serves to Ok the procedure and do the math, the other clears the values entered by the user to their defaults.
What I'd like to do is to make the Clear button sensitive to whatever tab is currently active. So if I'm in Tab 1 and press "Clear", only the Tab 1...
I often need to display a list of files to the user, say, as a result of a search query.
Typically I describe my own simple DataTemplate for FileInfo. But I'm lazy to re-implement all the Explorer's functionality: the Views, Sorting, Context Menus and drag&drop.
I feel like the problem is common and someone has already assembled a go...
Today I am led to say for the greatest level of flexibility using a Grid of ContentControl elements is the way to go. Are there any caveats coming for choosing this strategy? (Note that, of course, I am not referring to the DataGrid or the GridView of a ListView.)
...
I am rewriting a C# class in VB. The C# class has a static constructor in it:
static Class()
{
...
}
which, through the Call Stack, I found is called by the main window's InitializeComponent() method. Everywhere I've looked has told me that the corresponding static constructor in VB is just:
Shared Sub New()
...
End Sub
b...
Hi, I'm working in a WPF project, I'm using the MVVM patter in my project.
I created a user control (also in WPF) and I want to use it in my project, now, my problem is that I have a method in my user control that I need to call from my View Model, but I don't know how to do that, how to bind to the method inside my control from the vie...
I am using a WPF TextBox editor to display a decimal value with 2 decimal places.
If i go into the TextBox, and put in the value 27.5, the textbox shows 27.50.
My current mask = "{}{double:5.2}". Is there any way to hide the decimal places if there is no value there? like 52 instead of 52.00?
...
It should look like this:
I don't care about reusing it in other applications that need somewhat different looks.
It's just for display
Content needs to wrap, maximum 3 lines.
I'm trying to implement it as a derived class of UserControl with XAML defining the visual elements, but I'm not sure if that's the best option.
So how wou...
Hi all,
I have a problem using the Web browser control. I use it to open facebook connect web form.
I press on a button on my application to open a window within the web browser control.
I set the Source property to the relevant URI .
When I opern the window the browser really navigate to the FB connect web form for entering the crede...
I have problem with loading resources for UserControl from referenced assembly in Expression Blend
Here is the relevant code:
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Referenced.Assembly;component/Resources/ResourceDic...
Hi!
I have a WPF ListView with several columns bound to a custom collection. The question is, how can I add another column which is calculated, not bound. Specifically, this is what I have, which displays fine:
<ListView Name="ui_rptTransactions">
<ListView.View>
<GridView>
...
I need to build a WPF control that looks somehow similar to this:
Where each color should be clickable and resizable (or selectable).
This control will be used to set modes on the hours of a day.
I've thought about making 24 buttons that would be arranged in a circle:
Another idea was to draw a complete circle and calculate user mo...
Hello.
In XAML I have a ScrollView and a ListView inside.
<ScrollViewer Margin="0, 0, 0, 2" HorizontalScrollBarVisibility="Visible">
<ListView BorderBrush="Red" BorderThickness="3" Name="listAnswers">
...
/>
So, when I remove the HorizontalScrollBarVisibility tag,
my border is unmovable while scrolling, but if I set Horizont...
SOLVED SOLVED SLOVED
the generics list was a list of structs
if you use a class instead of a struct it works fine
i.e.
public class Person
{
public string Name { get; set;}
public string ID { get; set;}
}
instead of
public struct Person
{
public string Name;
public string ID;
}
I am doing somethin...
Hi all,
I am developing WPF 'lookless' controls in Visual Studio 2008. I am also using the WPF Toolkit so I can have the Visual States. I have loaded the controls into Blend and editing the control template. I can see the Visual States fine in the States Tab but I cannot see the Parts tab anywhere on screen or in the menus!
I know it e...