I want to display a string in a message box with a following format:
Machine : TestMachine
User : UserName
I am doing this:
string strMsg = "Machine :" + "TestMahine" + "\r\n" +
"User :" + "UserName";
MessageBox.Show(strMsg);
When I do this the message box do not display a string as formated above. Colon...
EDIT: Apparently I was a little confusing. The original post will remain below, but the main thing I'm asking is if there is a way to make a textblock on a usercontrol static, so that when I try to set it's value with a static method, it doesn't whine and say "An object reference is required for the non-static field, method, or property ...
Hi all,
I'm trying to make a player that user can click on the slider and mark a segment. The segment should be appear at different color. Also, there should be tiny button on both sides of segment, so the user can click on them to cancel/change it's position.
Can you recommend me how to achieve this targets ?
How to place the tiny but...
Hi,
I do want to create a listview which consists of many items of an own class. One of the properties is a text which can contain one or more links in it. Normally I use a textblock with a binding on Text to get this content displayed.
Now I do want those text being parsed for links and then dynamically make those links clickable. I f...
Hi all
I have a combobox which is databound to a list of elements. But in addition to that list of elements, i want to have another item. This item should display the text 'New...'
The idea is if they select one of the normal elements, it performs some action involving that element. If they select the 'New' element, it will take them to ...
Hi,
I have a 2d array of a class. The size of array is very large (around 3000*3000) and accessing the array with ordinary row and column method is taking very much time. For this purpose, I want to use pointers to access the array.
Following is my array code:
Class definition:
Class BoxData
{
Size _bound;
bool _isFilled=fa...
I have a data bound UI. When I change the underlying data the UI updates fine but the controls appear to remain subscribed to my PropertyChanged events.
I have the following:
An ItemsControl bound to ListA
Each item ListA contains a sub list
ListB that is displayed using another
ItemsControl
Each item ListB is displayed using a
TextB...
I thought this would be something simple but so far i found nothing. How do you do it?
...
Hi everybody!
I try to rewrite my Application using the MVVM pattern.
I have a window to show related documents for different objects with static methods like this:
public partial class ShowRelatedDocuments : Window
{
private ShowRelatedDocuments()
{
InitializeComponent();
}
public static void ShowRe...
Hi all,
I apologise for this question as it is rather fuzzy and there are several questions integrated but as they are so closely related I did not want to break them apart into several submissions.
I am currently thinking about how to test for configuration errors in an application. There are different options available and one whic...
I've recently engaged on studying WPF (to be honest, I've gotten into it just because there was built-in 3D object, camera and rendering capabilities), which has allowed me to do this:
Download: Master Maze
Use directional keys ([ ↑ ] [ ↓ ] [→] [←]) to walk and turn, [Q] or [A], and [W] or [S] ("god mode") to have a broader look ...
How does one create a WPF front-end that has an Application object from within another application (an existing MFC / CLR application, but that's another story)? The existence of the Application as the entry point of the assembly seems to prevent such a use. Certainly, you can use a WPF application as an assembly. Can't you?
...
I have a listbox and I am trying to Bind DataTable with it. I debug the Code and there is data in the DataTable but it does not show the data inside the DataList.
<Window.Resources>
<local:myCurrencyColor x:Key="CurrColor"></local:myCurrencyColor>
</Window.Resources>
<Grid Name="grid1">
<ListBox Margin="28,111,130,24" N...
In WinForms, Application.DoEvents method has been regarded as evil by some people. Can anybody tell if its counterpart of Dispatcher.PushFrame in WPF is safe to use?
...
I have a TabControl and each Tab can contain the same UI but with different data. In any tab the user can click on a button and bring up a popup. This sets a Style property to the ViewModel telling it what style to use for the popup UI. The Style gets bound to a custom DependecyProperty that is attached to a custom PopupUserControl. My p...
I'm currently working on enabling drag-and-drop support for our company app.
The error I keep getting seems weird to me.
What this says is that
The property 'DragDropHelper.IsDragSource' does not exist in XML namespace 'clr-namespace:DragAndDrop;assembly=DragAndDrop'. Line 61 Position 83
The property is an attached property in the ...
Hi, all!!
I have a list view and bind its items to the my database by means of datacontext.
<ListView x:Name="waypointList"
ItemsSource="{Binding }"
BorderThickness="0"
ItemContainerStyle="{DynamicResource ListItemStyle}" >
<ListView.View>
<GridView AllowsColumnReorder="F...
Hello guys.
I've got combobox binded to string[].
I haven't got clear combobox items. But I want measure my dropown items.
How can I get width of items in combobox at runtime. I need this to manage width of my combo.
...
I've noticed that the margin or height of the default Separator as it is styled in the menus in WPF seems to be slightly larger than some other applications such as Visual Studio 2010. I know that these Separators can be re-templated by applying a new style with a custom ControlTemplate but like always I'm looking for any possible way to...
We have extended the rich text editor to provide us with additional behaviour.
We have a requirement to paste images into the rich text editor and then allow the user to change the text wrapping, so that multiple lines of text wrap around the image.
Images are able to be pasted into the rich text editor and the binary is embeded with...