Telerik Forums
UI for WPF Forum
1 answer
346 views
I have some properties that use a DataFormDataField (will be a text field with a label) and the label will be very long so it needs to wrap to a new line.

So far I have been unable to do. Tried to build a template for the label on it, but cannot find the element needed to set this value.

What is the correct way to do this?
Dimitrina
Telerik team
 answered on 23 Jun 2014
2 answers
2.0K+ views
Hello,

We have a control that contains a RadCarousel that gets it's DataContext/ItemSource set to a View Model property which is an ObservableCollection<Tool> of custom "Tools" objects.  That object has a Name property and an Image property.  In it's previous life in a generic legacy WPF solution the control data bound the icon/image to display using an "ImagePath" data member.  This worked fine because the control was able to access images set to Resource as the build type and located in a /Resources folder.

The current project is a Prism 4 solution and contains multiple modules.  Each module is loaded dynamically from a folder at runtime using the DirectoryModuleCatalog class.  This is all working fine and each module injects it's own RibbonGroup into a RadRibbonView,  The Home RibbonGroup contains this RadCarousel control mentioned above.  Each module injects it's own "Tool" into the hosted view model using an event.  This is working fine in that the RadCarousel is displaying the tools but is currently only displaying a name property.  The DataTemplate binds the "Name" and "Image" data members but again the image is not showing.

The Tool class has an "ImageTool" property (of type System.Drawing.Image)  that is filled by the Module classes before the Home Ribbon shows.  So by the time the Home Ribbon view shows it has a valid ItemSource filled with these Tool objects and their respective ToolImages property containing an instantiated image.  I felt it had to be done this way because the "ImagePath" design or property in it's previous life is now obsolete in that there cannot be a static path pointed to in this Prism paradigm where the host project is loading these modules dynamically and from a folder.

Here is the DataTemplate code that is working but not showing an image ..


<DataTemplate x:Key="customItemTemplate">
                <Grid HorizontalAlignment="Center">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>                    
                    <Image  Source="{Binding ToolIimage}" Width="25" Height="25" Grid.Row="0"/>
                    <TextBlock Text="{Binding Name}" Grid.Row="1" />
                </Grid>
            </DataTemplate>

Can someone offer a suggestion as to how to get an image displaying for each item in the Carousel from an instantiated image?

Thank you,

Reid


Reid
Top achievements
Rank 2
 answered on 23 Jun 2014
7 answers
486 views
I can't figure out how to add the contents of a RadDocument (with styling) to a table cell when exporting to PDF. Any advice on how I should go about solving this?

        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            var span = new Span();
            span.Text = "Span1";
            var paragraph = new Paragraph();
            paragraph.Inlines.Add(span);
            var tableCell1 = new TableCell();
            tableCell1.Blocks.Add(paragraph);
            
            var tableCell2 = new TableCell();
            tableCell2.Blocks.Add(Editor.Document); // THIS WON'T COMPILE, BUT HOW TO FIX?

            var tableRow = new TableRow();
            tableRow.Cells.Add(tableCell1);
            tableRow.Cells.Add(tableCell2);

            var table = new Table();
            table.AddRow(tableRow);

            var section = new Section();
            section.Blocks.Add(table);

            var document = new RadDocument();
            document.Sections.Add(section);

            var saveFileDialog = new SaveFileDialog();
            saveFileDialog.DefaultExt = ".pdf";
            saveFileDialog.Filter = "Portable Document Format (*.pdf) | *.pdf";

            var result = saveFileDialog.ShowDialog();

            if (result == true)
            {
                using (var saveFileStream = saveFileDialog.OpenFile())
                {
                    var provider = new PdfFormatProvider();

                    provider.Export(document, saveFileStream);
                }
            }
        }
Petya
Telerik team
 answered on 23 Jun 2014
1 answer
212 views
I've test telerik control for example ListBox and GridView when the content get scroll these warning came out, just curious what this mean for why it is thrown, no storyboard I've created or modified yet, the only changes the default theme to Window8Touch ?
Any idea to get rid of this thanks.

System.Windows.Media.Animation Warning: 6 : Unable to perform action because the specified Storyboard was never applied to this object for interactive control.; Action='Remove'; Storyboard='System.Windows.Media.Animation.Storyboard'; Storyboard.HashCode='34280961'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement.HashCode='34280961'; TargetElement.Type='System.Windows.Media.Animation.Storyboard'
Lance | Senior Manager - Technical Support
Telerik team
 answered on 23 Jun 2014
5 answers
1.0K+ views
Hi,
Does anyone know if there is a way to disable the dropdown calendar of the DateTimePicker?
I would still like to be able to enter the date in the text area.

Thanks

Alek
Telerik team
 answered on 23 Jun 2014
1 answer
157 views
Hi,
I have problem with Carousel Items. I have grid with RadCarousel control and I would like to rise Carousel Items. Everything is shown on image. Could you tell me where I can change Items position?
My cod:
 <telerik:RadCarousel 
                             x:Name="sampleRadCarousel"
                            Background="Transparent"
                             ItemsSource="{Binding CarouselCollection}"
                             HorizontalAlignment="Center" 
                             AllowDrop="True"
                             Panel.ZIndex="4" 
                             Grid.Column="1"
                             HorizontalScrollBarVisibility="Disabled"
                            
                             carouselDragDrop:CarouselDragDropBehavior.IsEnabled="True">
                    <telerik:RadCarousel.ItemsPanel>
                        <ItemsPanelTemplate>
                            <telerik:RadCarouselPanel HorizontalAlignment="Center" VerticalAlignment="Top" IsItemsHost="True" />
                        </ItemsPanelTemplate>
                    </telerik:RadCarousel.ItemsPanel>
                    <telerik:RadCarousel.ItemTemplate>
                        <DataTemplate>
                            <telerik:Tile TileType="Single" Height="120" Width="150">
                                <Grid >
                                    <TextBlock Text="Travel"/>
                                </Grid>
                            </telerik:Tile>
                        </DataTemplate>
                    </telerik:RadCarousel.ItemTemplate>
                </telerik:RadCarousel>
Przemysław
Top achievements
Rank 1
 answered on 22 Jun 2014
2 answers
351 views
I want to click RadPane to show and hide RadPane. Like Visual Studio does. (No auto show and hide when MouseEnter)
Please watch this picture
Ye HaoChen
Top achievements
Rank 1
 answered on 21 Jun 2014
7 answers
310 views

Hi,

When applying implicit styles almost all controls seem to have white characters with a black background, except for the Datafilter.

when adding a filter, you can click a dropdown, and the values in the dropdown are correct in white color, but once selected the color of the characters are black and the background is black.

Erdem
Top achievements
Rank 1
 answered on 20 Jun 2014
6 answers
209 views
Hello,

I try to use the RadScheduleViewCommands.DeleteAppointment in a MVVM pattern in my XAML, like this :

                <Button Name="DeleteButton" Margin="5"
                        Content="{x:Static loc:Locals.activity_create_window_delete_btn}"
                        IsEnabled="{Binding CanDeleteAppointment}"
                        Command="telerik:RadScheduleViewCommands.DeleteAppointment">

But this doesn't seem to work, as the button is always disabled. I even tried using IsEnabled="True", but it remains the same.

Is this a bug, or is there anything I do wrong ?

Thanks for help.

Boris
Kalin
Telerik team
 answered on 20 Jun 2014
2 answers
128 views
Is there a way to have different RadMap backgrounds for different zoom levels?   I have an application that uses a high-level map for a facility.  When I zoom in to a certain level I would like to switch to a more detailed image background.  I would need the RadMap to behave as follows:

* for zoom levels 20-15, use URI #1 as the background image.
* for zoom levels 15 and lower, use URI #2 as the background image.

  What is the best way to achieve this bahavior?
Andrey
Telerik team
 answered on 20 Jun 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?