I'm trying to add inlines to a text block using the code below. The text block's window uses a Themes.xaml file for styling, but when I add the runs dynamically, the styling does not get applied. Can you help me understand why?
foreach (string key in wrappingOptions.Keys)
{
Hyperlink link = new Hyperlink(new Run(key));
string s = ne...
I have these buttons that contain images right, that have a drop-shadow effect, the opacity of which varies, depending on whether you are mousing over them or not. I have these buttons inside a wrap panel (and in one case, a stack panel). Now, (only on my home computer, not my laptop!), if I hover over a button that is not on the end o...
Hi,
is there any way to search a text through code and bring the focus. This is to bring focus on heading in a xpsDocument.
Thanks,
...
The code below works as follows: a form is shown with a list of sorted names. When the button is clicked a new name is added to the list at the appropriate sorted position from the textbox . When an item of the list is doubleclicked it is prefixed with "AAA", which triggers it to be placed on top of the list.
When I change the Observable...
Can someone explain how the mediator pattern works with multiple instances.
My code in the view:
public MyView() {
Mediator.Register("CloseWindow",()=>Close());
}
and in the ViewModel:
public SomeMethod() {
Mediator.Notify("CloseWindow");
}
This works find as long as there is only one instance of the View - ViewModel pair....
Hello folks!
I was wondering if I can set the splash screen to a programmatic SplashScreen instead of having to do it thru an image.
Any ideas?
Best regards
...
Hi,
Is there a way for a open file dialog to use the "My Computer" instead of a specific path. In this example, the W: drive is the intial directory.
Dim dlgOpen As New Microsoft.Win32.OpenFileDialog
dlgOpen.Filter = "Bases de données Access(*.mdb)|*.mdb"
dlgOpen.InitialDirectory = "W:"
I figure there must be a value...
In WPF, how would I do the following:
Every x milliseconds, underline 3 words at a time. After x milliseconds, underline the next 3 words.
Every x milliseconds, have 3 words appear and disappear from the window?
If I were to use Windows Forms, is there still a way of doing (1) and (2) above?
Thank you
...
I'm working with the MVVM pattern in WPF (a bit new to both).
I'd like to set up an InputBinding on a CheckBox that corresponds to a Control + Click event, but do not see a Modifiers property on the MouseBinding element. This is what I'd like to achieve (fictitious code, obviously- Modifiers doesn't exist):
<CheckBox>
<CheckBox.In...
After a bit of digging it would appear that the WPF built in spell checker only supports English, Spanish, French, and German - which beggars belief somewhat. I can understand they can't really ship comprehensive spell checkers for every language with WPF, but I'd at least expect it to be able to use the Office ones if they are installed...
Hi
I want to have an image bound to a boolean and have the source of the image to depend on the boolean value
i.e. true source="image1" false source="image2"
I was wondering if there is a way to do it inline without need for a converter.
...
Does anyone have any examples of showing a window dialog using MVVM (Prism)? - for example a configuration settings window when a command is executed.
All of the examples I've seen use the mediator pattern which is fine, but they also all have a reference to the view in the view model which is not ideal (we're using DataTemplates)
Than...
I currently have a canvas which contains a bunch of sqaures as its children.
These sqaures sit on different lines.
I would like to draw a background for the canvas which draws lines (like a notepad would have feint blue lines on the paper)
I would like to draw this dynamically by binding it to a collection of "lines"
So if there are 2 ...
When looking into MVC frameworks for flex, as3, silverlight, and wpf... a common concept of ICommand / commanding keeps appearing... Can anyone explain the advantage of using ICommand / Execute() ?
Where I dont see the value added is - Why can't the controller map the input (ie: a click event) to the correct method inside of the model? ...
Question:
How do send data to a view model when using command binding? So that, for example, when i click a button, it sends the "currently selected index" of a list so that it can perform an operation on that item of the list
Further Information:
I'm working on a program where i have a list of shipments, and each shipment has a li...
I currently have a listbox that has its selected item bound to a property on my ViewModel. Whenever the selected item isn't null I want to perform an animation on it. However I keep getting the following error "Cannot freeze this Storyboard timeline tree for use across threads" and from research sort of understand why this is happenin...
Hi guys,
I'm developping a little application in WPF and I want to localize my resources.
I've always used resources files (.resx), but I heard about BAML that was suppose to change the way of manage localization in a WPF application.
I made my research and I found a way to translate my application using those files.
I wrote a blog ...
Hi,
I have a custom class that extends "Control" like so:
class TheCountry : Control
{
//...details
}
Then I have that element in my XAML:
<Canvas x:Name="mainCanvas" Height="768" Width="1536" AllowDrop="False">
<spots:TheCountry Country="Australia" Canvas.Left="1362" Canvas.Top="486" Template="{DynamicResource TheCountr...
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:myapp="clr-namespace:MyPlayer.Model"
mc:Ign...
I have a fairly small solution that includes a WPF windows application. It builds perfectly fine when built from the solution. I recently integrated the projects contained within the solution into an existing, much larger command line build that uses MSBuild. When built from the command line, however, I get the following errors:
MainWin...