For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I have created a class called DatePickerEx.cs that inherits from DatePicker class. Then I created a UserControl called CustomDatePicker.xaml that references the DatePickerEx.cs class in the xaml code.If I bind the "selecteddate" property in xaml at this point, it works good. So far so good.
Now, I reference the CustomDatePicker.xaml usercontrol inside another UserControl, at this point I have no way to set the "SelectedDate" property on the new UserControl called CustomDatePicker.xaml, can someone explain me how can I expose the DatePickerEx.cs->DatePicker.cs SelectedDate property via the new userControl CustomDatePicker.xaml to any other consumers of CustomDatePicker.xaml.
I need to use some kind of Dependency Property to achive this?
If you did public class DatePickerEx : DatePicker, then you'll get all the public properties and methods of DatePicker. If that's not working, you did something wrong . Not sure what since you didn't post what errors you are getting or any code.
in my application WPF/C# , i have a simple TreeView "treview1" that content for exemple:
Now i have an Class "Search.cs", and within this Class i have some methods like: advanced_serch and simpl_search , I want to be able to modified my TreeView in this two methods(advanced_serch and simpl_search).....
I am attempting to create a common WPF logon dialog. I have the dialog as a separate DLL which access a service and returns the user permissions. This works except the dialog displays as an independent window. I want to pass the main window to the dialog as the owner.
I call the logon dll from the main viewmodel
new IFALogon.LogonDlg().DoLogon(MainUI.AppID, "Finance NPA");
if (IFALogon.LogonVM.DBUser == null)
How can I pass the main view to this DLL.
Never underestimate the power of human stupidity
Hi, I am looking for ideas. Have to create controls dynamically and store values of textbox, combobox in database. Suppose I will give number 5 in existing textbox then it should create 5 textboxes and 5 combobox dynamically, all values of controls also have to save. Please share yours ideas. Thanks
That code selects the TabItem whose Tag is an int16 value that matches r.id.
The Tag property is present in many controls and is a custom user value not used by Wpf. You can use it to store an object of your choice and perform your custom logic based on it, for example save the original id such as in this code
I have read along with this article [^]regarding WPF applications with Markup extensions.
In the end of the article there is the section called Custom Markup Extension example which I have tried and got working. The XAML code for the example confuse me.
In the articles C# code there is the ReflectionExtension class
I also have a further question regarding Markup Extensions.
In my company we have a language project which have classes deriving the MarkupExtension class. This gives the possibility in design time of XAML to
show different language text for buttons, labels and whatever other UIElement control that can display a text. The interesting is that I can switch language while in design-time and the XAML automatically display the selected language's text.
Unfortunately I cannot give away a example of this source code and might give me an explain how this works, but the XAML code I use is this:
The "l" is the namespace reference xmlns:l="clr-namespace:namespace;assembly=assembly".
The "lang" must be a reference to a class deriving the MarkupExtension class. But I have search in the entire project for "lang" and cannot find ANY reference to it what so ever.
The "Key=20" is a reference to a the current language file with indices. In the my example there must be an index with value 20 which contain some text for whatever language is selected.
Without having the source code, can someone explain this?
Steffe - MarkupExtensions apply a little bit of magic here. If you add Extension to the end of your MarkupExtension class, you can leave this out of your XAML and the compiler will pick up which one you're trying to use.
As to your other question, is there a class called LangExtension in there by any chance?
Last Visit: 31-Dec-99 18:00 Last Update: 23-Jul-14 14:45