Telerik Forums
UI for WPF Forum
5 answers
356 views
While using RedGate ANTS Performance Profiler, I get to a point in my application where I click on a RadButton.  Through the event handlers that subsequently get fired, I eventually get the following error:

System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.

This only occurs when I'm running the profiler and so far, only in this one place.  The view that it's trying to initialize doesn't explicitly use the RadRichTextBoxRibbonUI.  It only uses RadWrapPanels and a RadComboBox.

Seeing how this doesn't happen during normal execution, it's hard to identify a cause within my implementation.  Also, not knowing the intrinsic behavior of how the performance profiler sets stuff up, I don't know what the difference would be.  

Any thoughts?

Stack Trace:
************** Exception Text **************
System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.
   at Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI..cctor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Documents\RichTextBoxUI\RichTextBoxUI\RadRichTextBoxRibbonUI.cs:line 32
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Xm8.UI.EWD2.MacroItemView.InitializeComponent() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml:line 1
   at Xm8.UI.EWD2.MacroItemView..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml.cs:line 34
   at Xm8.UI.EWD2.MacroDialog..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroDialog.cs:line 100
   at Xm8.UI.EWD2.MacroSLView.ShowMacroDialog(IXm8State xm8State, String oldMacroCode, MacroDoc macroDoc, EDPL edpl, MacroOperation macroOperation) in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroSLView.xaml.cs:line 50
   at Xm8.EWD2.MP.Model.Macro.MacroSLModel.DoShowMacroDialog(MacroDoc macroDoc) in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 382
   at Xm8.EWD2.MP.Model.Macro.MacroSLModel.OnAdd() in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 351
   at Core.Sys.RelayCommand.Execute(Object parameter) in c:\sd\Trunk\core\Asm\Sys\Sys\RelayCommand.cs:line 67
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:line 388
[truncated]
Boby
Telerik team
 answered on 20 Mar 2012
1 answer
89 views
Hi

If I add page numbers into the header or footer, they show the correct page number for each page (as you'd expect).

If you then protect the document, they will all show the same page number.  And one of them usually shows some selection highlighting on it too.  Even if I set the permissions for the page number to Everyone... same problem!

Any fix or workaround for this?
Boby
Telerik team
 answered on 20 Mar 2012
1 answer
170 views
How does one get the GridView to detect property validation attribute violations when they are specified in a buddy class?  For example, the property attributes in the buddy class below are not respected by the GridView.  I.e., the grid doesn't indicate a validation error for and it permits entry of a part number that doesn't match the regex. By contrast, the GridView does respect the IValidatableObject.Validate method.  I've tried making the PartMetadata class public; but it still didn't validate.

Any ideas?  thanks!

[MetadataType(typeof(Part.PartMetadata))]
public partial class Part : IValidatableObject {
 
    private sealed class PartMetadata {
        [RegularExpression(@"[0-9A-F]{4,20}")] // Not respected by the RadGridView 
        public string PartNumber { get; set; }
    }
 
    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) {
        if (PartNumber == DrawingNumber) { 
            yield return new ValidationResult("part number = drawing number", new string[] { "PartNumber", "DrawingNumber" });
        }
    }
}


Nedyalko Nikolov
Telerik team
 answered on 20 Mar 2012
1 answer
119 views
Hi,

I have a gridview, and its itemsSource is bound to an ObservableCollection in the ViewModel, and the isBusy property is also bound to a property there. Initially the collection is empty. In the constructor of the ViewModel I initiate a new thread which does the data collection from the DB. When the thread starts, it sets the isBusy property to true and triggers a notification, so the grid displays the loading animation. When the data is collected, the grid is notified again, and it displays the data. At the beginning the query which collected the data ran for 10+ seconds, and everything worked fine. But the query was optimized, so now it runs for less then a second, and here comes my problem: at startup for some reason I have no data displayed in the grid. The pager displays correct data, everything is fine except there is nothing in the grid. If I go to the second page, the data appears, and from that point everything works fine again.

I guess that my problem is related with the worker thread I create and the PropertyChanged notification, but I have no idea how to make it work. One more detail: if I put a Thread.Sleep(1000) before the PropertyChanged notification, everything works as expected. But this is not a nice way to solve the problem.

Any ideas how to make it work?

Thanks,

Andras

Pavel Pavlov
Telerik team
 answered on 20 Mar 2012
0 answers
114 views
Hi,

In RadScheduleView I wan to show the start and end time for the particular slot when mouse hovering on that slot. For achieving this, I
used the Mouseoverhighlightstyle. The code looks like this.
<ControlTemplate>
         <Grid>
                  <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="Black" HorizontalAlignment="Left"    VerticalAlignment="Top" Text="{Binding ActualStart,StringFormat=t}" />
                      <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="Black" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding ActualEnd,StringFormat=t}" />
          
</Grid>
                </ControlTemplate>

But it is not working....

ANY HELP.......
jeya
Top achievements
Rank 1
 asked on 20 Mar 2012
1 answer
98 views
In My Project I need to Emabad many types of documents Like word ,excel,pdf ,picturs ..
there is a way to use teleik control to support this kind of solution.
Ivo
Telerik team
 answered on 20 Mar 2012
5 answers
391 views

I'm currently evaluating the RadDocking classes for a client - so I'm pretty new to the telerik stuff. Bear with me...

I've made a super-simple example with a couple of portfolios in a tabbed container:

<telerikDocking:RadDocking>
    <telerikDocking:RadDocking.CompassStyle>
        <Style TargetType="dock:Compass">
            <Setter Property="IsTopIndicatorVisible" Value="false" />
        </Style>
    </telerikDocking:RadDocking.CompassStyle>
    <telerikDocking:RadDocking.RootCompassStyle>
        <Style TargetType="dock:RootCompass">
            <Setter Property="IsTopIndicatorVisible" Value="false" />
        </Style>
    </telerikDocking:RadDocking.RootCompassStyle>
    <telerikDocking:RadDocking.DocumentHost>
        <telerikDocking:RadSplitContainer>
            <telerikDocking:RadPaneGroup>
                <telerikDocking:RadDocumentPane Header="Portfolio 1" Title="Portfolio 1">
                    rates and trade controls go here
                </telerikDocking:RadDocumentPane>
                <telerikDocking:RadDocumentPane Header="Portfolio 2" Title="Portfolio 2">
                    More rates and trade controls go here
                </telerikDocking:RadDocumentPane>                    </telerikDocking:RadPaneGroup>
        </telerikDocking:RadSplitContainer>
    </telerikDocking:RadDocking.DocumentHost>
    <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedRight">
        <telerikDocking:RadPaneGroup>
            <telerikDocking:RadPane Header="Fx" Content="...drag onto portfolio..." IsPinned="False" />
            <telerikDocking:RadPane Header="Commodities" Content="Commodities controls" IsPinned="False" />
            <telerikDocking:RadPane Header="Research" Content="Research controls" IsPinned="False" />
        </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
    <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
        <telerikDocking:RadPaneGroup>
            <telerikDocking:RadPane Header="Orders" Content="Order blotter" />
            <telerikDocking:RadPane Header="Trades" Content="Trade blotter" />
        </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
</telerikDocking:RadDocking>

What I'd like to do is reorder the tabs in the DocumentHost using drag-and-drop (like you can reorder tabs in your Internet Explorer 8 or Visual Studio 2010).

Does anyone know how to do this?

/thomas
George
Telerik team
 answered on 20 Mar 2012
1 answer
276 views
Hi,
I am setting the list box orientation to Horizontal with this XAML
 
                           <telerik:RadListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </telerik:RadListBox.ItemsPanel>

and it's work fine but  i did not find how can i set the Horizontal ScrollBar Visibility

e.g.
  VerticalScrollBarVisibility="Auto" or HorizontalScrollBarVisibility="Auto" 


Thanks
Roni Saar

Software Developer, Intergraph Corporation.

mailto:roni.saar@intergrapg.comwww.intergraph.com

Georgi
Telerik team
 answered on 20 Mar 2012
3 answers
265 views
Hi,

I have a RadGridView in my WPF v2011.3.116.40 application. This RadGridView has 6 columns.

Let's say that the last column extends beyond the RadGridView and I have not selected any cell in this RadGridView, so only part of those cells are visible.
When I click on a cell of this column, my horizontal scrollbar is moved so as to show the entire contents of the cell.

I would like to override this behaviour so that selecting a cell does not shift my horizontal scrollbar, except if the keyboard navigation keys are used to select a cell that is not visible at all.
I have not found a property of RadGridView that would implement this.

I hope my question is clear.

Thanks.
Nick
Telerik team
 answered on 20 Mar 2012
0 answers
104 views
I'm using TwoWay binding on the SelectedItem property of the RadTreeListView control to sync my view and view model:  

SelectedItem="{Binding SelectedItem,Mode=TwoWay}" SelectionMode="Single"

It appears that the selected item brush color is not applied to the SelectedItem in this scenario:

Load control
Expand tree
Collapse tree
Set SelectedItem in view mode

In other scenarios, the selected item brush color is applied correctly.


  

Mark
Top achievements
Rank 1
 asked on 19 Mar 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?