<telerik:RadGridView x:Name="AnalysisListGridView" Grid.Column="3" Grid.Row="2" Width="665" Height="405" RowLoaded="RadGridView1_RowLoaded" AutoGenerateColumns="False" IsReadOnly="True" VerticalAlignment="Center" HorizontalContentAlignment="Left" MinColumnWidth="20" GridLinesVisibility="Horizontal" RowHeight="33" CanUserSortColumns="True" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserFreezeColumns="False" FontSize="12" ScrollViewer.CanContentScroll="true" FontFamily="Arial" Padding="0,0,0,0" BorderBrush="#FFCBD7E3" Foreground="#FF707070" Background="#FFFFFFFF" HorizontalGridLinesBrush="#FFEEEEEE" SelectionUnit="FullRow" SelectionMode="Single" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" GroupPanelForeground="Black" AlternateRowBackground="#FFF4F4F4" telerik:Theming.Theme="Windows7" telerik:StyleManager.Theme="Windows7" BorderThickness="1" Cursor="Hand" LoadingRowDetails="AnalysisListGridView_LoadingRowDetails"> <telerik:RadGridView.HeaderRowStyle> <Style TargetType="telerik:GridViewHeaderRow"> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1"> <GradientStop Color="#FFcfd7db"/> <GradientStop Color="#FFFFFFFF" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> </Style> </telerik:RadGridView.HeaderRowStyle> <telerik:RadGridView.ChildTableDefinitions> <telerik:GridViewTableDefinition/> </telerik:RadGridView.ChildTableDefinitions> </telerik:RadGridView>private void GetHistoryInfo(){ this.AnalysisListGridView.ItemsSource = null; this.AnalysisListGridView.ItemsSource = ROISync.GetOfflineAnalysisHistory(App.LoggedInUser).ListROIAnalysis.OrderByDescending(an => an.AnalysisLastUpdatedDateTime);}void RadGridView1_RowLoaded(object sender, RowLoadedEventArgs e){ GridViewTableDefinition definition = new GridViewTableDefinition(); GridViewRow row = e.Row as GridViewRow; ROIAnalysisDataModel analysis = e.DataElement as ROIAnalysisDataModel; if (row != null && analysis != null) { row.IsExpandable = this.HasSubordinates(analysis); }}private bool HasSubordinates(ROIAnalysisDataModel analysis){ IEnumerable<ROIAnalysisDataModel> childDataSource = ROISync.GetOfflineAnalysisHistory(App.LoggedInUser).ListROIAnalysis.Where(a => a.ParentID != 0).OrderByDescending(an => an.AnalysisLastUpdatedDateTime); return (from Anlys in childDataSource where Anlys.ParentID == analysis.AnalysisID select Anlys).Any();}void AnalysisListGridView_LoadingRowDetails(object sender, GridViewRowDetailsEventArgs e){ GridViewTableDefinition definition = new GridViewTableDefinition(); GridViewDataControl dataControl = (GridViewDataControl)sender; if (dataControl.ParentRow != null && dataControl.ChildTableDefinitions.Count == 0) { int ParentID = Convert.ToInt32(((ROIDataModels.ROIAnalysisDataModel)(((Telerik.Windows.Controls.RadRowItem)(dataControl.ParentRow)).Item)).AnalysisID); foreach (ROIDataModels.ROIAnalysisDataModel folder in ROISync.GetOfflineAnalysisHistory(App.LoggedInUser).ListROIAnalysis) { if (folder.FileType.ToLower() == "folder" || folder.ParentID == ParentID) { definition.DataSource = null; definition.DataSource = ROISync.GetOfflineAnalysisHistory(App.LoggedInUser).ListROIAnalysis.Where(a => a.ParentID == folder.ParentID).OrderByDescending(an => an.AnalysisLastUpdatedDateTime); dataControl.ChildTableDefinitions.Add(definition); } } }}private void AnalysisListGridView_DataLoading(object sender, Telerik.Windows.Controls.GridView.GridViewDataLoadingEventArgs e){ GridViewDataControl dataControl = (GridViewDataControl)sender; if (dataControl.ParentRow != null) { dataControl.ShowGroupPanel = false; dataControl.AutoGenerateColumns = false; dataControl.CanUserFreezeColumns = false; dataControl.IsReadOnly = true; dataControl.SelectionMode = System.Windows.Controls.SelectionMode.Extended; dataControl.IsFilteringAllowed = false; dataControl.ShowInsertRow = false; dataControl.RowIndicatorVisibility = Visibility.Collapsed; dataControl.ChildTableDefinitions.Clear(); dataControl.Margin = new Thickness(0, 0, 0, 0); dataControl.EnableRowVirtualization = true; dataControl.MaxHeight = 100; ScrollViewer.SetVerticalScrollBarVisibility(dataControl, ScrollBarVisibility.Auto); int ParentID = Convert.ToInt32(((ROIDataModels.ROIAnalysisDataModel)(((Telerik.Windows.Controls.RadRowItem)(dataControl.ParentRow)).Item)).AnalysisID); GridViewTableDefinition definition = new GridViewTableDefinition(); definition.DataSource = null; definition.DataSource = ROISync.GetOfflineAnalysisHistory(App.LoggedInUser).ListROIAnalysis.Where(a => a.ParentID == ParentID).OrderByDescending(an => an.AnalysisLastUpdatedDateTime); //dataControl.ChildTableDefinitions.Clear(); dataControl.ChildTableDefinitions.Add(definition); }}<telerik:InformationLayer Name="informationLayer"> <telerik:MapPolygon Points="{Binding MyPolygon}" /></telerik:InformationLayer>RadMap map = (RadMap)e.Options.Destination;Location dropCursorLocation = Location.GetCoordinates(map, e.Options.RelativeDragPoint);Image img = new Image { Source = new BitmapImage(new Uri(@"..\Resources\MyImage.png", UriKind.Relative)) };MapLayer.SetLocation(img, dropCursorLocation);informationLayer.Items.Add(img);public class ParameterView : ViewModelBase<ParameterView> { private string _name; public string Name { get { return _name; } set { _name = value; Notify(x => x.Name);} } private string _value; public string Value { get { return _value; } set { _value = value; Notify(x => x.Value); } } public ParameterView() : this(string.Empty,string.Empty) { } public ParameterView(string name, string value) { Name = name; Value = value; } public override string ToString() { return string.Format("Name: {0}, Value: {1}", _name, _value); } public bool Equals(ParameterView other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other._name, _name); } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != typeof(ParameterView)) return false; return Equals((ParameterView)obj); } public override int GetHashCode() { unchecked { return ((_name != null ? _name.GetHashCode() : 0) * 397) ^ (_value != null ? _value.GetHashCode() : 0); } } } <Style TargetType="{x:Type data:ComboBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=telerik:RadComboBox}}"> <Setter Property="Height" Value="23"></Setter> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style TargetType="{x:Type telerik:RadComboBoxItem}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=telerik:RadComboBoxItem}}"> </Style> </Setter.Value> </Setter> </Style>Shared Sub New() ' Connect new template DefaultStyleKeyProperty.OverrideMetadata(GetType(ComboBox), New FrameworkPropertyMetadata(GetType(ComboBox)))End SubProtected Overrides Sub OnInitialized(ByVal e As System.EventArgs) ' Call base class method MyBase.OnInitialized(e) ' Ensure template Me.DefaultStyleKey = GetType(ComboBox)End SubSystem.IO.FileLoadException
Could not load file or assembly 'Telerik.Windows.Controls, Version=2011.2.808.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata) at Microsoft.Windows.Design.Metadata.AttributeTableContainer.<MergeAttributesIterator>d__c.MoveNext() at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper) at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType) at MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings() at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly) at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source) at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() at MS.Internal.Host.PersistenceSubsystem.Load() at MS.Internal.Host.Designer.Load() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
System.NotSupportedException
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.