الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Craeting Custom Tooltip Using Xaml In Wpf Applications

مغلق
بدأه sameh_samir في 17 أغسطس 2007 · 2 رد · 1,147 مشاهدة · في قسم تكنولوجيا Microsoft .NET العام
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

Some of you know that creating a custom tooltip in non-standard ui applications is a real headic, but with using WPF classes and XAML you can create a custom tooltip (such as Office 2007 tooltips or any other style you want) in just a minute as follow

1. On VS code name Orcas, or VS 2005 with WPF extension installed (you can get the extensions from Here, and create project with the "WPF Application" template

3ffda82e7f.jpg

2. In the main window (Window1.xaml) drop down the control that the tooltip will apply to

14b40f7ebb.jpg

3. Inside the "Button" tag in the XAML view, and insert a new "Button.Tooltip" tag that contains a "StackPanel" tag (which will serve as a container for the our custom tooltip) and insert the following tags (which represent controls in the System.Windows.Controls namespace) inside it:

·Label

·TextBlock

·Line

·StackPanel which contains Image and Label tags

as shown in the picture

f9a39e33e9.jpg

Note that you must edit the source attribute of the image control to an existing resource in your project

4. Finally, run the project and see the result

68e05b21a2.jpg

As you see we create this tooltip in minutes, and you can customize it using any controls available in the "System.Windows.Controls" namespace or any cusotm controls inherit from it

Sameh Samir Sami

5th Year Student

Computer Engineering Dept

57e0bf6f1e.jpg

http://Gu7a.blogspot.com

Sameh Samir Sami

B.Sc of Computer Engineering

Synergy Professional Services

mylogodo7.png

Weblog: blogs.windowsclient.net/sameh

#2

thank u v.much eng sameh bat i'd like to contact you on mail coz i have some ques about MCTS certification

plz contact me soon

my email is : tweety_1020@hotmail.com

thnx in advance

#3

جزاك الله خيرا اخي علي المثال الرائع

وننتظر المزيد منك ان شاء الله

Khaled_Tiger

النجاح الوحيد في الحياة هو أن تستطيع أن تحيا حياتك بالطريقة التي تريدها

يخاطبني السفيه بكل قبح *** فأكره أن أكون له مجيبا

يزيد سفاهة فأزيد حلمــا *** كعود زاده الإحراق طيبا

إذا نطق السفيه فلا تجبه *** فخير من إجابته السكوت

فإن كلَمته فرَجت عنــــه *** وإن خليته كمداً يـمـــوت

هذا الموضوع مغلق.

مواضيع مشابهة