or
Notes note =
new
Notes();
int
NoteID = note.AddNote(_wardcode);
Telerik.Windows.Controls.RadWindow rw =
new
Telerik.Windows.Controls.RadWindow();
rw.Width = nw / 5;
rw.Height = nh / 4;
rw.Name =
"NotePad"
+ NoteID;
rw.BorderThickness =
new
Thickness(0);
rw.BorderBrush =
null
;
rw.Header =
"Note"
+ DateTime.Now.ToShortDateString();
Grid grid =
new
Grid();
grid.Background =
new
SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 240, 255, 255));
System.Windows.Controls.RichTextBox rtxtbx =
new
System.Windows.Controls.RichTextBox();
rtxtbx.Name =
"txtNotePad"
+ NoteID;
rtxtbx.FontSize = fontsize * 2;
rtxtbx.GotFocus +=
new
RoutedEventHandler(rtxtbx_GotFocus);
rtxtbx.LostFocus +=
delegate
(
object
sender, RoutedEventArgs e) { rtxtbx_LostFocus(sender, e, NoteID); };
rw.LayoutChangeEnded +=
delegate
(
object
sender, EventArgs e) { Page2_LayoutChangeEnded(sender, e, NoteID); };
rw.Closed +=
delegate
(
object
sender, WindowClosedEventArgs e) { Page2_Closed(sender, e, NoteID); };
rw.LostFocus +=
new
RoutedEventHandler(rw_LostFocus);
grid.Children.Add(rtxtbx);
rw.Content = grid;
rw.Show();
<
telerik:RadCalendar
DayButtonStyle
=
"{StaticResource CalendarButtonStyle}"
>
<
telerik:RadCalendar.Style
>
<
Style
TargetType
=
"{x:Type telerik:RadCalendar}"
>
<
Setter
Property
=
"DayTemplate"
Value
=
"{x:Null}"
/>
<
Setter
Property
=
"DayTemplateSelector"
>
<
Setter.Value
>
<
local:CustomTemplateSelector
/>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:RadCalendar.Style
>
</
telerik:RadCalendar
>
<
Page
x:Class
=
"WpfBrowserApplication1.Page1"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"600"
d:DesignWidth
=
"800"
Title
=
"Page1"
>
<
Grid
VerticalAlignment
=
"Top"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
telerik:RadDropDownButton
Focusable
=
"False"
x:Name
=
"RadDropDownButton1"
Width
=
"120"
Height
=
"120"
Background
=
"{x:Null}"
Margin
=
"20"
CornerRadius
=
"8"
BorderThickness
=
"1"
BorderBrush
=
"#E0E0E0"
DropDownButtonPosition
=
"Bottom"
DropDownIndicatorVisibility
=
"{Binding IsShowContent}"
>
<
StackPanel
Orientation
=
"Vertical"
Margin
=
"0,0,0,0"
>
<
Image
Width
=
"84"
Height
=
"84"
Source
=
"/WpfBrowserApplication1;component/Images/soundforge.ico"
/>
<
TextBlock
HorizontalAlignment
=
"Center"
FontWeight
=
"Bold"
VerticalAlignment
=
"Center"
Text
=
"soundforge"
/>
</
StackPanel
>
<
telerik:RadDropDownButton.DropDownContent
>
<
ListBox
BorderThickness
=
"0"
Focusable
=
"False"
>
<
telerik:RadMenuItem
Focusable
=
"False"
Height
=
"32"
Width
=
"230"
Header
=
"Header1"
Click
=
"RadMenuItem_Click"
>
<
telerik:RadMenuItem.Icon
>
<
Image
Height
=
"16"
Width
=
"16"
Source
=
"/WpfBrowserApplication1;component/Images/Bmp.ico"
/>
</
telerik:RadMenuItem.Icon
>
</
telerik:RadMenuItem
>
</
ListBox
>
</
telerik:RadDropDownButton.DropDownContent
>
</
telerik:RadDropDownButton
>
</
StackPanel
>
</
Grid
>
</
Page
>
private
void
RadMenuItem_Click(
object
sender, RoutedEventArgs e)
{
RadControlsScenario1 dd =
new
RadControlsScenario1();
dd.WindowStartupLocation = WindowStartupLocation.CenterScreen;
dd.ShowDialog();
dd.Focus();
}
public
class CustomVisibilityStyle : StyleSelector
{
public override Style SelectStyle(object item, DependencyObject container)
{
PeopleDataDC ppl = item as PeopleDataDC;
if (ppl.Level == 6)
{
return VisibleStyle;
}
else
{
//((System.Windows.Controls.
ContentPresenter)(((System.Windows.Controls.Grid)(((Telerik.Windows.Controls.GridView.GridViewCell)(container)).Template.LoadContent())).Children[7])).Visibility = Visibility.Collapsed;
}
return CollapsedStyle;
}
public Style VisibleStyle { get; set; }
public Style CollapsedStyle { get; set; }
}