or
<
telerik:RadWindow
x:Class
=
"TelerikSamples.RadWindowTest"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
TextOptions.TextFormattingMode
=
"Display"
>
<
Grid
>
<
Expander
Header
=
"Expand me"
>
<
StackPanel
>
<
TextBlock
Text
=
"Text1"
/>
<
TextBlock
Text
=
"Text2"
/>
<
TextBlock
Text
=
"Text3"
/>
</
StackPanel
>
</
Expander
>
</
Grid
>
</
telerik:RadWindow
>
Session.OlapProvider =
new
AdomdDataProvider
{
ConnectionSettings =
new
AdomdConnectionSettings()
{
ConnectionString = Settings.Default.OlapConnString,
Database = Settings.Default.OlapDatabase,
Cube = Settings.Default.OlapCube
}
};
this
.pivot.DataProvider = Session.OlapProvider;
'TelerikRadPaneTest.CustomPane'
does not contain a definition
for
'GetParentToolWindow'
and no extension method
'GetParentToolWindow'
accepting a first argument of type
'TelerikRadPaneTest.CustomPane'
could be found (are you missing a
using
directive or an assembly reference?)
<
Window
x:Class
=
"TelerikRadPaneTest.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:c
=
"clr-namespace:TelerikRadPaneTest"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
DockPanel
>
<
telerik:RadDocking
PaneStateChange
=
"RadDocking_PaneStateChange_1"
telerik:AnimationManager.IsAnimationEnabled
=
"False"
HasDocumentHost
=
"False"
Margin
=
"0,50,0,0"
Grid.Row
=
"1"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"2"
Grid.RowSpan
=
"2"
telerik:StyleManager.Theme
=
"Windows8"
BorderThickness
=
"0"
>
<
telerik:RadSplitContainer
telerik:ProportionalStackPanel.RelativeSize
=
"120, 200"
MinWidth
=
"450"
InitialPosition
=
"DockedLeft"
telerik:StyleManager.Theme
=
"Windows8"
>
<
telerik:RadPaneGroup
>
<
c:CustomPane
CanUserPin
=
"False"
CanUserClose
=
"False"
>
<
ScrollViewer
>
<
TextBlock
Text
=
"Very Long Scrollable Text"
/>
</
ScrollViewer
>
</
c:CustomPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
</
DockPanel
>
</
Window
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows;
using
System.Windows.Controls;
using
System.Windows.Data;
using
System.Windows.Documents;
using
System.Windows.Input;
using
System.Windows.Media;
using
System.Windows.Media.Imaging;
using
System.Windows.Navigation;
using
System.Windows.Shapes;
using
Telerik.Windows.Controls;
namespace
TelerikRadPaneTest
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
}
private
void
RadDocking_PaneStateChange_1(
object
sender, Telerik.Windows.RadRoutedEventArgs e)
{
var radDock = sender
as
RadDocking;
if
(radDock.IsLayoutChanging)
{
var pane = e.OriginalSource
as
CustomPane;
if
(pane !=
null
)
{
var scrollviewer = pane.Content
as
ScrollViewer;
var view = scrollviewer.Content
as
TextBlock;
Size size =
new
Size(view.ActualWidth, view.ActualHeight);
Point loc = radDock.PointToScreen(
new
Point(0, 0));
//start, this won't compile
var win = pane.GetParentToolWindow();
//win.Width = size.Width;
//win.Height = size.Height;
//end
}
}
}
}
}
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
Telerik.Windows.Controls;
namespace
TelerikRadPaneTest
{
public
class
CustomPane : RadPane
{
public
CustomPane()
:
base
()
{
base
.ContextMenuTemplate =
null
;
}
protected
override
void
OnMouseEnter(System.Windows.Input.MouseEventArgs e)
{
this
.ChangeVisualState(
true
);
}
protected
override
void
OnMouseUp(System.Windows.Input.MouseButtonEventArgs e)
{
base
.OnMouseUp(e);
if
(!
this
.IsPinned)
{
this
.IsPinned =
true
;
}
}
}
}
<
telerik:RadMenuItem
x:Name
=
"EmployeeLookupMenuItem"
StaysOpenOnClick
=
"True"
>
<
telerik:RadMenuItem.Header
>
<
StackPanel
>
<
telerik:RadWatermarkTextBox
Name
=
"EmployeeLookupTextBox"
KeyUp
=
"EmployeeLookupTextBox_KeyUp"
WatermarkContent
=
"Employee ID"
Width
=
"100"
/>
</
StackPanel
>
</
telerik:RadMenuItem.Header
>
</
telerik:RadMenuItem
>