Telerik Forums
UI for Silverlight Forum
3 answers
40 views
Hi,
I have added a RadColorPicker control on xaml and binded (two way) its selected color property with a string. I am raising an error in cs file for it if some color is not matching with the predefined string. But it does not show any validation error (Red color box).
Please suggest any solution.

Thanks
Naveen
Martin Ivanov
Telerik team
 answered on 16 May 2016
7 answers
494 views
Hello 

I am getting following error when i select a color in ColorPicker.

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Any Suggestions?
Kris

 
caleb
Top achievements
Rank 1
 answered on 05 Mar 2015
1 answer
30 views
I have a datagrid with colopicker inside CellTemplate.
<controls:ChildWindow>
            <sdk:DataGrid  Grid.Row="1"
        ItemsSource="{Binding ColumnColors}"
        x:Name="dgColors" IsReadOnly="True"
        SelectionMode="Extended"
        AutoGenerateColumns="False" GridLinesVisibility="All">
                <sdk:DataGrid.Columns>
    <sdk:DataGridTemplateColumn Width="Auto" MinWidth="200" Extensions:GridColumnExtentions.BindableTitle="{Binding DisplayValue, Converter={StaticResource _localizationKeysConverter}, Source={StaticResource _LocalizationKeys}}">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <telerik:RadColorPicker
            Grid.Column="1" Grid.Row="5" Margin="5,0,5,5"
            AutomaticColor="Transparent"
            NoColorText="{Binding ResetColor, Converter={StaticResource _localizationKeysConverter}, Source={StaticResource _LocalizationKeys}}"  
            SelectedColor="{Binding ColorBrush, Mode=TwoWay}"
          
            VerticalAlignment="Stretch"   
            Visibility="{Binding IsOneColumnChart, Converter={StaticResource _booleanToVisibilityConverter}}" Style="{StaticResource RadColorPickerStyle1}"/>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
        </sdk:DataGrid.Columns>
  </sdk:DataGrid>
</controls:ChildWindow>
When I try to expand color picker, Exception thrown.
Error:
Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an
instance of an object.
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[]
cvData)
at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
at Telerik.Windows.Controls.PopupWrapper.AdjustPopupLocation()
at Telerik.Windows.Controls.PopupWrapper.OnPopupOpened(Object sender,
EventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex,
Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr
unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String
eventName, UInt32 flags)
Pavel R. Pavlov
Telerik team
 answered on 15 Sep 2014
3 answers
25 views
I have a ColorPircker on a ToolBar bound  to a string property.  Everything is working as expected, but I noticed an uncaught exception being thrown in one of the Telerik dlls. Here it is:

A first chance exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls


I've verified that the string is never null, so I am assuming this is coming from inside the Controls dll.  Has anyone else noticed this before?

-Scott
Petar Mladenov
Telerik team
 answered on 25 Jul 2014
1 answer
10 views
I see the offical demo Demo about ColorPicker FirstLook , the first colorpicker set IsRecentColorsActive true,but it's not working .

then i do it myself , the bug is confirmed.
Martin Ivanov
Telerik team
 answered on 26 May 2014
4 answers
97 views
Hi, when the palette is populated with a large number of colours it seems every 7th colour (vertically) has a larger gap below it. This produces a messy looking palette.

This applies to our HighlightColorPicker controls but the regular ColorPicker controls in the Table border and background dialogs are fine.

We are only setting a few things as below. Are there some defaults that I am missing which might help? I've tried looking at the objects in debug mode but can't see anything obvious. I've tried adjusting the data template, but it seems this only impacts the item inside each square (i.e. setting margin will produce a space between the containing square and the colour rectangle).

We are running on 2013.2 so let me know if we should update to fix this. Thanks.

Code (table controls):
colorSelector.AutomaticColor = Colors.Transparent;
colorSelector.ColorPropertyPath = "CustomColor";
colorSelector.HeaderPaletteVisibility = Visibility.Collapsed;
colorSelector.StandardPaletteVisibility = Visibility.Collapsed;
colorSelector.NoColorVisibility = Visibility.Collapsed; 
colorSelector.MainPaletteHeaderText = "My Colours";
colorSelector.PaletteItemsTemplate = this.ColorPickerDataTemplate;

XAML (HighlightColorPicker):

<ColorPickers:HighlightColorPicker Name="fontColorPicker"
                                                  ColorPropertyPath="CustomColor"
                                                  HeaderPaletteVisibility="Collapsed"
                                                  StandardPaletteVisibility="Collapsed"
                                                  MainPaletteHeaderText="My Colours"
                                                  NoColorVisibility="Collapsed"
                                                  PaletteItemsTemplate="{StaticResource ColorPickerTemplate}"
                                                  Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png"
                                                  telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontForeColorCommand}"
                                                  />
Nick
Top achievements
Rank 1
 answered on 06 Jan 2014
1 answer
90 views
I have successfully used a solution provided in this forum to remove the ARGB tooltip from the main palette of a ColorPicker (http://www.telerik.com/community/forums/silverlight/colorpicker/remove-palette-item-tooltip.aspx).  However, I also need to remove the tooltips from the header and standard palettes.  The solution provided in the earlier thread does not work for me, as I have three separate ribbon buttons using the ColorPicker style.  They all need different images which I am providing, but when I apply the colorpickerStyle from the solution, the custom images are lost and the ColorPicker fails to open when clicking the dropdown, crashing the editor.

Here is my relevant XAML, using the styles provided in the above solution:
<telerik:RadButtonGroup>
<telerik:HighlightColorPicker Name="ColorPicker" AutomaticColor="Transparent" Height="22" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/highlight.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontHighlightColorCommand}" telerik:ScreenTip.Description="Make text look like it was marked with a highlighter pen." telerik:ScreenTip.Title="Text Highlight Color" SelectedColor="Yellow" MainPaletteItemsStyle="{StaticResource itemsStyle}"/>
<telerik:HighlightColorPicker Height="22" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontForeColorCommand}" telerik:ScreenTip.Description="Change the text color." telerik:ScreenTip.Title="Font Color" SelectedColor="Red" Style="{StaticResource colorpickerStyle}"/>
</telerik:RadButtonGroup>
...
<telerik:RadButtonGroup>
<telerik:HighlightColorPicker AutomaticColor="Transparent" BorderThickness="0" MaxHeight="36" Height="20" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ParagraphBackgroundColor.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeParagraphBackgroundColorCommand}" telerik:ScreenTip.Description="Color the background behind the selected text or paragraph." telerik:ScreenTip.Title="Shading" SelectedColor="Transparent" MainPaletteItemsStyle="{StaticResource itemsStyle}"/>
</telerik:RadButtonGroup>

Thanks for your help!
David Magill
Virtify, Inc.
Iva Toteva
Telerik team
 answered on 03 Jul 2013
2 answers
46 views
Hi

I am trying to style the colorpicker to use a custom image instead of the "A" that is displayed.
Atatched is the sample xaml and image that has details of what i am trying to do.

could you please help me in getting the bucket fill image inside the colorpicker??

thanks,
Vipin
Vipin
Top achievements
Rank 1
 answered on 24 Dec 2012
3 answers
64 views
Is there an example of how to use the ColorPicker and ColorEditor combined to provide a basic color selection capability with an optional advanced mode for custom colors?
Petar Mladenov
Telerik team
 answered on 09 Oct 2012
3 answers
149 views
Hi All,

I need color picker with No Color option in silverlight. same as RadColor picker of Ajax(Please find attched image).

No color option should return "Null" value.

Thanks and Regards,
Ruchi Patel
Ruchi
Top achievements
Rank 1
 answered on 30 Jul 2012
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?