Telerik Forums
UI for WPF Forum
1 answer
371 views

XAML editor complains “Object does not match target type” while using the RibbonView. I have the latest updated VS2017. 

I have tried using the threads on StackOverflow.

https://stackoverflow.com/questions/14591781/object-does-not-match-target-type

https://stackoverflow.com/questions/31815177/design-mode-error-object-does-not-match-target-type-for-loaded-page-resource

https://stackoverflow.com/questions/31726759/xaml-editor-complains-object-does-not-match-target-type-for-sharedresourcedict

I was not able to resolve my error using them links. The source compiles and runs but the editor complains and it is irritating and obstructing actual errors. 

<telerik:RadRibbonView Grid.Row="0" x:Name="RibbonView" ApplicationName="MyApplication" Title="{x:Static properties:Resources.RibbonViewTitle}"
                               ApplicationButtonImageSource="../Images/MyApp.png"
                               MinimizeButtonVisibility="Visible">
            <!--Need to add HelpRequested Event Handler using MVVM-->
            <telerik:RadRibbonView.TabStripAdditionalContent>
                <StackPanel Orientation="Horizontal">
                    <TextBlock x:Name="Vers" VerticalAlignment="Center" Margin="2,0,5,0"></TextBlock>
                </StackPanel>
            </telerik:RadRibbonView.TabStripAdditionalContent>
            <telerik:RadRibbonView.QuickAccessToolBar>
                <telerik:QuickAccessToolBar>
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuSave}" SmallImage="../Images/Save_sm.png"
                                             Size="Small" telerik:KeyTipService.AccessText="1" Command="{Binding Path=SaveWorkflowCommand}" />
                    <telerik:RadRibbonButton Text="Undo" SmallImage="../Images/Undo_sm.png"
                                             Size="Small" telerik:KeyTipService.AccessText="2" Command="ApplicationCommands.Undo" />
                    <telerik:RadRibbonButton Text="Redo" SmallImage="../Images/Redo_sm.png"
                                             Size="Small" telerik:KeyTipService.AccessText="3" Command="ApplicationCommands.Redo" />
                </telerik:QuickAccessToolBar>
            </telerik:RadRibbonView.QuickAccessToolBar>
            <telerik:RadRibbonView.ApplicationMenu>
                <telerik:ApplicationMenu>
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuNewWorkflow}" LargeImage="../Images/New_lg.png"
                                             Command="{Binding Path=NewWorkflowCommand}" />
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuOpen}" LargeImage="../Images/Open_lg.png"
                                             Command="{Binding Path=OpenWorkflowCommand}"/>
                    <telerik:Separator />
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuSave}" LargeImage="../Images/Save_lg.png"
                                             Command="{Binding Path=SaveWorkflowCommand}"/>
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuSaveAs}" LargeImage="../Images/SaveAs_lg.png"
                                             Command="{Binding Path=SaveAsWorkflowCommand}"/>
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.FileMenuSaveAll}" LargeImage="../Images/SaveAs_lg.png"
                                             Command="{Binding Path=SaveAllWorkflowsCommand}"/>
                    <telerik:Separator />
                    <telerik:RadRibbonButton Text="Import XML" LargeImage="../Images/Import_lg.png"/>
                    <telerik:RadRibbonButton Text="{x:Static properties:Resources.DebugMenuStartWithoutDebugging}" LargeImage="../Images/Start_lg.png"
                                             Command="{Binding Path=StartWithoutDebuggingCommand}"/>
                    <telerik:Separator />
                    <telerik:RadRibbonButton Text="Copy Variables" LargeImage="../Images/Variables_lg.png"/>
                    <telerik:Separator />
                    <telerik:RadRibbonButton Text="Manage Extensions" LargeImage="../Images/Import_lg.png"
                                             />
                    <telerik:Separator />
                    <telerik:RadRibbonButton Text="Encrypt Value" LargeImage="../Images/encrypt_lg.png"
                                             />
                    <telerik:Separator />
                    <telerik:ApplicationMenu.FooterContent>
                        <StackPanel Height="25"
                                    Orientation="Horizontal">
                            <telerik:RadButton Width="86"
                                               Height="22"
                                               Margin="3 0 2 0">
                                <telerik:RadButton.Content>
                                    <StackPanel Orientation="Horizontal"
                                                VerticalAlignment="Center"
                                                Margin="3 0  5 0">
                                        <Image Width="16"
                                               Height="16" Source="../Images/Exit_sm.png" />
                                        <TextBlock Margin="4 0 0 0"
                                                   VerticalAlignment="Center"
                                                   Text="Exit" />
                                    </StackPanel>
                                </telerik:RadButton.Content>
                            </telerik:RadButton>
                        </StackPanel>
                    </telerik:ApplicationMenu.FooterContent>
                </telerik:ApplicationMenu>
            </telerik:RadRibbonView.ApplicationMenu>
            <telerik:RadRibbonView.Items>
                <telerik:RadRibbonTab Header="{x:Static properties:Resources.HomeMenu}">
                    <telerik:RadRibbonGroup Header="{x:Static properties:Resources.FileMenu}" telerik:KeyTipService.AltAccessText="F">
                        <telerik:RadRibbonButton x:Name="RibGrpNew" LargeImage="../Images/New_lg.png" Size="Large"
                                                 Text="{x:Static properties:Resources.FileMenuNewWorkflow}" telerik:KeyTipService.AccessText="N" Command="{Binding Path=NewWorkflowCommand}" ToolTip="Ctrl+N" />
                        <telerik:RadCollapsiblePanel>
                            <telerik:RadRibbonButton x:Name="RibGrpOpen"
                                                     LargeImage="../Images/Open_lg.png" Size="Large"
                                                     Text="{x:Static properties:Resources.FileMenuOpen}" telerik:KeyTipService.AccessText="O" Command="{Binding Path=OpenWorkflowCommand}" />
                        </telerik:RadCollapsiblePanel>
                        <StackPanel>
                            <telerik:RadRibbonButton x:Name="RibGrpSave"
                                                     SmallImage="../Images/Save_lg.png" Size="Medium"
                                                     Text="{x:Static properties:Resources.FileMenuSave}" telerik:KeyTipService.AccessText="S" Command="{Binding Path=SaveWorkflowCommand}" />
                            <telerik:RadRibbonButton x:Name="RibGrpSaveAs"
                                                     SmallImage="../Images/SaveAs_lg.png" Size="Medium"
                                                     Text="{x:Static properties:Resources.FileMenuSaveAs}" telerik:KeyTipService.AccessText="SA" Command="{Binding Path=SaveAsWorkflowCommand}" />
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                    <telerik:RadRibbonGroup x:Name="RibGrpExec" Header="{x:Static properties:Resources.RibGrpExecHeader}" telerik:KeyTipService.AltAccessText="E">
                        <telerik:RadRibbonButton x:Name="RibGrpStart" LargeImage="../Images/Start_lg.png" Size="Large"
                                                 Text="{x:Static properties:Resources.DebugMenuStartWithoutDebugging}" Tag="0" telerik:KeyTipService.AccessText="ST" Command="{Binding Path=StartWithoutDebuggingCommand}">
                        </telerik:RadRibbonButton>
                        <telerik:RadRibbonButton x:Name="RibGrpStartWithVariable" Tag="1" LargeImage="../Images/StartVar_lg.png" Size="Large"
                                                 Text="Start with variable" telerik:KeyTipService.AccessText="ST" Command="{Binding Path=StartWithoutDebuggingCommand}">
                        </telerik:RadRibbonButton>
                        <telerik:RadCollapsiblePanel>
                            <telerik:RadRibbonButton x:Name="RibGrpStop"
                                                     LargeImage="../Images/Stop_lg.png" Size="Large"
                                                     Text="{x:Static properties:Resources.DebugMenuAbort}" Command="{Binding Path=AbortCommand}" ToolTip="F5" />
                        </telerik:RadCollapsiblePanel>
                        <StackPanel>
                            <telerik:RadRibbonButton x:Name="RunDebug"
                                                     SmallImage="../Images/Debug_sm.png" Size="Medium"
                                                     Text="{x:Static properties:Resources.DebugMenuStartDebugging}" telerik:KeyTipService.AccessText="DG" Command="{Binding Path=StartWithDebuggingCommand}" />
                            <telerik:RadRibbonButton x:Name="RunVerbose"
                                                     SmallImage="../Images/Debug_sm.png" Size="Medium"
                                                     Text="Verbose_Logging" telerik:KeyTipService.AccessText="DG"/>
                        </StackPanel>
                    </telerik:RadRibbonGroup>
                </telerik:RadRibbonTab>
                <telerik:RadRibbonTab Header="{x:Static properties:Resources.ViewMenu}" />
                <telerik:RadRibbonTab Header="{x:Static properties:Resources.DebugMenu}" />
                <telerik:RadRibbonTab Header="{x:Static properties:Resources.HelpMenu}" />
            </telerik:RadRibbonView.Items>
        </telerik:RadRibbonView>

Any help or suggestion is appreciated. 

 

 

 

 

Martin
Telerik team
 answered on 06 Jun 2017
2 answers
146 views
I am trying to add these pages to the main radwizard element in my window. When I try to call radWizard.WizardPages.Add (wizardpage) at runtime, radWizard is null! What event can I subscribe to when the radWizard element is instantiated?
live cooking demonstration
Top achievements
Rank 1
 answered on 06 Jun 2017
3 answers
1.5K+ views

Hello, i created a control, inheriting from RadGridView.

My custom control is ok, i created a style for it in app.xaml to put some settings.

The problem is, i want to change the columnheader's color, the foreground color of headerColumn's text, how can I do it pls ?

I also have another question, is it possible to add a main title to my control ? Like a main Header.

 

Thanks in advance :)

Dilyan Traykov
Telerik team
 answered on 05 Jun 2017
1 answer
145 views

Hi,

I have created a custom shape and when i use the shape as a connection target, the connection does not bound to my shape. In other words the shape color does not change (as a RadDiagramShape does when mouse goes over it) when I try to choose the shape as a connector target. Also "e.Connection.Target" in ConnectionManipulationCompleted event is null.

It works correctly as a connection source.

Is there any setting for my custom shape?

Thanks.

Martin Ivanov
Telerik team
 answered on 05 Jun 2017
0 answers
65 views

I'm using MinuteTimeSpan Component in TimeSpan Picker. it takes value as 00 when i select 60. 

how to select 60 minutes as it is.

 

 

Thanks,

Sarathi

Sarathi
Top achievements
Rank 1
 asked on 05 Jun 2017
1 answer
109 views

I'm using an older version. Do the new versions have built-in support for the new (?) imagerySet values? If not, how would I add them? I've used my own or inherited versions of OSM classes, but the Bing classes are more complex and have more levels of inheritance. Below is the documentation for the static map, but I don't know if this applies to Tiles, too.

https://msdn.microsoft.com/en-us/library/ff701724.aspx

Aerial – Aerial imagery.
AerialWithLabels –Aerial imagery with a road overlay.
CanvasDark - A dark version of the road maps.
CanvasLight - A lighter version of the road maps which also has some of the details such as hill shading disabled.
CanvasGray - A grayscale version of the road maps.
Road – Roads without additional imagery.

Martin Ivanov
Telerik team
 answered on 05 Jun 2017
3 answers
458 views

Hello, I have RadGridView and grouped items in it. I want to collapse the groups and I can do it. But if any property of item will be changed, the group contains this item will be expanded automatically. I want this group to be expanded regardless of the property changes. Is it bug or feature of RadGridView? Tell me, please, how I can fix it?

I wanted to attach archive with sample project. But forum allows me to attach pictures only

Egor
Top achievements
Rank 1
 answered on 05 Jun 2017
8 answers
338 views
I am using GridView's export functionality of 2016.1.217.45 version, see below the code snippet.
string extension = "xls";
          SaveFileDialog dialog = new SaveFileDialog()
          {
            DefaultExt = extension,
            Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
            FilterIndex = 1
          };
          if (dialog.ShowDialog() == true)
          {
            using (Stream stream = dialog.OpenFile())
            {
              m_oGridView.Export(stream,
               new GridViewExportOptions()
               {
                 Format = ExportFormat.Xlsx,
                 ShowColumnHeaders = true,
                 ShowColumnFooters = false,
                 ShowGroupFooters = false,
               });
            }
          }

 

Following are the issues observed, please provide solutions or workarounds:

  1. The first row in the grid is not getting exported as second row in excel, instead it is appearing in the first row of excel after the row headers. See the snapshots - "GridUISnapshot.JPG" and "ExcelSnapshot.JPG".
  2. If the users specifies the extension of the file as ".xlsx", it is getting exported but not able to open in excel 2016 version, the error message is shown in the snapshot - "XlsxExtensionOpenError.JPG".  Since in File save dialog, user can specify .xlsx extension as well. In code we are specifying the format to be exported is xlsx, but still it is not compatible.

Thanks,

Viksit

Flemming
Top achievements
Rank 1
Veteran
 answered on 02 Jun 2017
1 answer
444 views

I'm playing around with the developer example projects for the gridview, specifically the "ComboboxColumnItemsSourceBinding", and I enabled the Search Panel on the Gridview where FilterMemberPath is set, but noticed it doesn't search inside the ComboBox Column. If I type for "Webber" in the Search Panel it comes up with nothing.....but the filter control for that column will work.

Is there something I am missing in the demo that I need to add to get this functionality working? Or do I need to go as far as making my own predicate and use FilterDescriptor<T>?

Stefan
Telerik team
 answered on 02 Jun 2017
3 answers
731 views

1) The below numeric input is always displaying 0 on screen load. I don't want to show anything. Latitude is defined as Decimal? is ViewModel.

2) I want this to allow only values between 32 and 38 upto 5 decimal digits.

How can I do this ? 

<telerik:RadMaskedNumericInput AllowInvalidValues="False" Value="{Binding Latitude, Mode=TwoWay}"  AutoFillZeros="False"  FlowDirection="LeftToRight" Placeholder=" "
                                              HorizontalAlignment="Left" AutoFillNumberGroupSeparators="false"  
                                              Mask="" SelectionOnFocus="SelectAll"  ></telerik:RadMaskedNumericInput>

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?