Hi, i have some problem.
The image editor created by wpf works normally. However, if you link to other programs, you will not see all the components. (Please refer to attached file)
I don't know why act like that. I look forward to your valuable feedback.
Thanks
6 Answers, 1 is accepted
We are not aware of the reported behavior. Can you tell me what does it mean to link the RadImageEditor to other programs? Also, can you send the RadImageEditor definition?
Regards,
Martin Ivanov
Progress Telerik
I am making a commercial program.
I can share the source but i can describe conditions when it doesn't work kind of that.
Please understand my situation.
1) Case 1: it works incorrectly
- In my program, the button is pressed, the image editor object is created and displayed like the attached photo.(for reference dpi is 96)
- The solution consists of several projects. One of them is an image editor.
2) Case 2 : it works normally
- In my program, the button is pressed, the image editor executable file is executed.(for reference dpi is 96)
I wonder why I get an error when I create and run an image editor object.
Please give me advice and solution.
Thanks for reading
Thank you for the additional information. However, it is still not clear what exactly happens. Can you please share some code that shows the XAML definition of RadImageEditor, the related code behind (only image editor related), and also the code that creates and shows the RadImageEditor in the incorrect scenario?
Also, can you check the Output pane of Visual Studio for any silent errors printed there? Maybe there is a binding error that can give us a hint what exactly happens.
Regards,
Martin Ivanov
Progress Telerik
Hi, Martin
I used this code it is in demo program.
In this code we overriding the Open and Close commands.
Thanks.
==============================================
<UserControl x:Class="Telerik.Windows.Examples.ImageEditor.ImageEditorUI.Example"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
xmlns:shapes="clr-namespace:Telerik.Windows.Media.Imaging.Shapes;assembly=Telerik.Windows.Controls.ImageEditor"
xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
xmlns:local="clr-namespace:Telerik.Windows.Examples.ImageEditor.ImageEditorUI"
mc:Ignorable="d"
xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=QuickStart.Common"
d:DesignWidth="800" d:DesignHeight="500" Loaded="UserControl_Loaded">
<telerikQuickStart:QuickStart.ExampleHeader>
<TextBlock Margin="8" Text="Default UI of RadImageEditor" />
</telerikQuickStart:QuickStart.ExampleHeader>
<Grid x:Name="LayoutRoot">
<telerik:RadImageEditorUI x:Name="ImageEditorUI" ZoomToCursor="True">
<telerik:RadImageEditorUI.ImageToolsSections>
<telerik:ImageToolsSection Header="Transform">
<telerik:ImageToolItem ImageKey="Resize" Text="Resize"
Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:ResizeTool x:Name="resizeTool" />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Resize" Text="Canvas Resize"
Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:CanvasResizeTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Rotate90CW" Text="Rotate 90" Command="commands:ImageEditorRoutedCommands.Rotate90Clockwise" />
<telerik:ImageToolItem ImageKey="Rotate180CW" Text="Rotate 180" Command="commands:ImageEditorRoutedCommands.Rotate180" />
<telerik:ImageToolItem ImageKey="Rotate90CCW" Text="Rotate 270" Command="commands:ImageEditorRoutedCommands.Rotate90Counterclockwise" />
<telerik:ImageToolItem ImageKey="RoundCorners" Text="Round Corners" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:RoundCornersTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="FlipHorizontal" Text="Flip Horizontal" Command="commands:ImageEditorRoutedCommands.FlipHorizontal" />
<telerik:ImageToolItem ImageKey="FlipVertical" Text="Flip Vertical" Command="commands:ImageEditorRoutedCommands.FlipVertical" />
<telerik:ImageToolItem ImageKey="Crop" Text="Crop" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:CropTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="DrawText" telerik:LocalizationManager.ResourceKey="ImageEditor_DrawText" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:DrawTextTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Draw" telerik:LocalizationManager.ResourceKey="ImageEditor_Draw" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:DrawTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Shape" telerik:LocalizationManager.ResourceKey="ImageEditor_Shape" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:ShapeTool>
<tools:ShapeTool.Shapes>
<shapes:RectangleShape />
<shapes:EllipseShape />
<shapes:LineShape />
</tools:ShapeTool.Shapes>
</tools:ShapeTool>
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Selection" telerik:LocalizationManager.ResourceKey="ImageEditor_Selection" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:SelectionTool >
<tools:SelectionTool.SelectionShapes>
<shapes:RectangleShape />
<shapes:EllipseShape />
<shapes:FreeformShape />
<local:TelerikLogoSelectionShape/>
</tools:SelectionTool.SelectionShapes>
</tools:SelectionTool>
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Pan" telerik:LocalizationManager.ResourceKey="ImageEditor_Pan"
Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:PanTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
</telerik:ImageToolsSection>
<telerik:ImageToolsSection Header="Adjust" >
<telerik:ImageToolItem ImageKey="HueShift" Text="Hue Shift" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:HueShiftTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Saturation" Text="Saturation" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:SaturationTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Contrast" Text="Contrast" Command="commands:ImageEditorRoutedCommands.ExecuteTool" >
<telerik:ImageToolItem.CommandParameter>
<tools:ContrastTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Invert" Text="Invert Colors" Command="commands:ImageEditorRoutedCommands.InvertColors" />
</telerik:ImageToolsSection>
<telerik:ImageToolsSection Header="Effects">
<telerik:ImageToolItem ImageKey="Sharpen" Text="Sharpen" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:SharpenTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
<telerik:ImageToolItem ImageKey="Blur" Text="Blur" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
<telerik:ImageToolItem.CommandParameter>
<tools:BlurTool />
</telerik:ImageToolItem.CommandParameter>
</telerik:ImageToolItem>
</telerik:ImageToolsSection>
</telerik:RadImageEditorUI.ImageToolsSections>
</telerik:RadImageEditorUI>
</Grid>
<telerikQuickStart:QuickStart.ConfigurationPanel>
<StackPanel>
<CheckBox Content="Zoom to Cursor" IsChecked="{Binding ZoomToCursor, ElementName=ImageEditorUI, Mode=TwoWay}" Margin="5"/>
</StackPanel>
</telerikQuickStart:QuickStart.ConfigurationPanel>
</UserControl>
================================================================
I've tested this but I couldn't reproduce the issue. Can you check the project and let me know if I am missing something?
Regards,
Martin Ivanov
Progress Telerik
Hi martin. I appreciate your interest and comment.
The cause of this problem is that other project ui settings have also been applied to my project.
I modified it so that no other settings apply to my project.
Thanks your consider.