or
<
telerik:RadTileView
Grid.Row
=
"0"
x:Name
=
"ChartTiles"
TileStateChangeTrigger
=
"SingleClick"
telerik:StyleManager.Theme
=
"Office_Blue"
ColumnsCount
=
"3"
RowsCount
=
"3"
ColumnWidth
=
"Auto"
RowHeight
=
"Auto"
MinimizedColumnWidth
=
"300"
MinimizedRowHeight
=
"300"
PreservePositionWhenMaximized
=
"true"
IsItemsSizeInPercentages
=
"True"
ItemsSource
=
"{Binding ChartingViewModel.Charts}"
telerik:TileViewPanel.IsColumnsShrinkEnabled
=
"True"
telerik:TileViewPanel.IsRowsShrinkEnabled
=
"True"
telerik:TileViewPanel.IsSizeBoundToPosition
=
"True"
TileStateChanged
=
"ChartTiles_TileStateChanged"
Loaded
=
"ChartTiles_Loaded"
TilesPositionChanged
=
"ChartTiles_TilesPositionChanged"
>
<
telerik:RadTileView.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
Style
=
"{StaticResource tileItemStyle}"
/>
</
DataTemplate
>
</
telerik:RadTileView.ItemTemplate
>
<
telerik:RadTileView.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadTileViewItem"
>
<
Setter
Property
=
"RestoredHeight"
Value
=
"{Binding TileRestoredHeight, Mode=TwoWay}"
/>
<
Setter
Property
=
"RestoredWidth"
Value
=
"{Binding TileRestoredWidth, Mode=TwoWay}"
/>
<!--<Setter Property="Position" Value="{Binding TilePosition, Mode=TwoWay}" />-->
<
Setter
Property
=
"ContextMenu"
Value
=
"{StaticResource ChartContextMenu}"
/>
</
Style
>
</
telerik:RadTileView.ItemContainerStyle
>
<
telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Label
Grid.Row
=
"0"
Grid.Column
=
"0"
HorizontalAlignment
=
"Left"
Content
=
"{Binding Path=Title}"
/>
<
StackPanel
Grid.Row
=
"0"
Grid.Column
=
"1"
HorizontalAlignment
=
"Right"
Orientation
=
"Horizontal"
>
<
RadioButton
Content
=
"Pie Chart"
IsChecked
=
"{Binding Path=IsPieChartActive}"
Margin
=
"0,5,0,5"
/>
<
RadioButton
Content
=
"Bar Chart"
IsChecked
=
"{Binding Path=IsBarChartActive}"
Margin
=
"5"
/>
</
StackPanel
>
<
ecaAnalyzerViews:PieChartControl
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Visibility
=
"{Binding Path=PieChartVisibility, TargetNullValue=Collapsed, FallbackValue=Collapsed}"
/>
<
ecaAnalyzerViews:BarChartControl
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Visibility
=
"{Binding Path=BarChartVisibility, TargetNullValue=Collapsed, FallbackValue=Collapsed}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadTileView.ContentTemplate
>
</
telerik:RadTileView
>
var Pattern = new RecurrencePattern();
Pattern.Frequency = Frequency_v;
Pattern.DayOrdinal = DayOrdinal_i;
Pattern.DaysOfWeekMask = DaysofWeekMask_v;
Pattern.FirstDayOfWeek = FirstDayofWeek_d;
Pattern.Frequency = Frequency_v;
Pattern.Interval = Convert.ToInt32(tasks_dr.Field<
Int64
>("Interval"));
Pattern.MaxOccurrences = Convert.ToInt32(tasks_dr.Field<
Int64
>("MaxOccurrences"));
Pattern.MonthOfYear = Convert.ToInt32(tasks_dr.Field<
Int64
>("MonthofYear"));
Pattern.DayOfMonth = Convert.ToInt32(tasks_dr.Field<
Int64
>("DayofMonth"));
System.DateTime? RecursUntil_d;
if (tasks_dr.Field<
String
>("RecursUntil") != "")
{
RecursUntil_d = Convert.ToDateTime(tasks_dr.Field<
String
>("RecursUntil"));
}
else
{
RecursUntil_d = DateTime.Now;
}
Pattern.RecursUntil = RecursUntil_d;
appointment.RecurrenceRule = new RecurrenceRule(Pattern);
public
void
ItemsRequest(
object
sender, ItemsRequestEventArgs e)
{
IList<SqlGeometry> geometryList =
new
List<SqlGeometry>();
LocationRect currentRegion =
new
LocationRect(e.UpperLeft, e.LowerRight);
string
sql =
string
.Format(
"SELECT the_geom FROM Locations WHERE the_geom.STIntersects(geometry::STGeomFromText('POLYGON(({0} {1}, {2} {3}, {4} {5}, {6} {7}, {0} {1}))', 0)) = 1 "
, currentRegion.Southwest.Longitude, currentRegion.Southwest.Latitude, currentRegion.Northwest.Longitude, currentRegion.Northwest.Latitude, currentRegion.Northeast.Longitude, currentRegion.Northeast.Latitude, currentRegion.Southeast.Longitude, currentRegion.Southeast.Latitude);
using
(SqlConnection sqlConnection =
new
SqlConnection(connectionString))
{
sqlConnection.Open();
using
(SqlCommand sqlCommand =
new
SqlCommand(geographicalBoundsSQL, sqlConnection))
{
using
(SqlDataReader reader = sqlCommand.ExecuteReader())
{
while
(reader.Read())
{
SqlGeometry sqlGeometry = (SqlGeometry)reader[
"the_geom"
];
geometryList.Add(sqlGeometry);
}
}
}
}