Telerik Forums
UI for WPF Forum
2 answers
228 views
Hi,

i use a RadGridView with a "GridViewImageColumn" like this:
<telerik:GridViewImageColumn DataMemberBinding="{Binding Bild}" Width="50" IsEnabled="False" ImageStretch="None" />

But how do i bind an image to this column:
public class Calls
{
public string Name { get; set; }
public string Tele { get; set; }
public string time { get; set; }
public string Datum { get; set; }
public Image bild { get; set; }
}
ObservableCollection<Calls> _CallCollection = new ObservableCollection<Calls>();
_CallCollection.Add(new Calls
{
Name = name_s,
Tele = tele_s,
time = time_s,
Datum = datum_s,
bild = image
});

Name, Tele, time and Datum is ok, but i can't see an image. How do i solve this?

i tried:
var image = new Image();
image.Source = new BitmapImage(new Uri("pack://application:,,/Images/settings.png", UriKind.Absolute));

But this is wrong...

thanks a lot
Rene
ITA
Top achievements
Rank 1
 answered on 25 Oct 2012
1 answer
574 views

Hi,
I am using radGridView with 2 level hierarchy with 
HierarchyChildTemplate. I don't want to show any column headers for the lowest level grid and I set ShowColumnHeaders to False. I  do not want to show that there's an inner grid at the first child level. How can I remove the space around the  radGridView? 

I do not have any margins, padding, border thickness properties. I tried removing the whole HierarchyChildTemplate
but still there is empty space. Can anyone please help where that space is coming. Please refer to attached pictures for clarity. Requirement is that the area marked with green should not appear.
Thanks,
Rosy



Dimitrina
Telerik team
 answered on 25 Oct 2012
1 answer
116 views
On my RichTextBox if you type something in, select the text, and increase the font size the width of the selector is no longer spanning the width of the text.  See attached please.  Works fine with decreasing the font.
Vasil
Telerik team
 answered on 25 Oct 2012
1 answer
150 views
I asked this in the webinar yesterday but I failed to get a good answer on this.

Is it possible to add the themes found in those Sales Dashboard demos as selectable themes? I think
they look far better than the default themes.
Kalin Milanov
Telerik team
 answered on 25 Oct 2012
3 answers
160 views
Hi, 

i have a problem with SplineSeriesDefinitinion.
On my project i have a RadChart with different SeriesDefinition on the same Data. I have buond the seriesDefinition type with the model, therefore i can change the series definition at runtime (without use code behind but only model).

The series definition that i use are:
  • StackedBarSeriesDefinition
  • StackedBar100SeriesDefinition 
  • BarSeriesDefinition
  • SplineSeriesDefinition

I attach code (xaml) and image (1.png, 2.png, 3.png) for example.

<telerik1:RadChart x:Name="PassFailChart" BorderThickness="0" Padding="0,10,0,0" Background="{x:Null}" IsTabStop="False" Grid.Row="1">
            <telerik1:RadChart.DefaultView>
                <telerik1:ChartDefaultView>
                    <telerik1:ChartDefaultView.ChartLegend>
                        <telerik1:ChartLegend x:Name="chartLegend" LegendItemMarkerShape="Circle" Background="{x:Null}" BorderBrush="{x:Null}" UseAutoGeneratedItems="True" />
                    </telerik1:ChartDefaultView.ChartLegend>
                    <telerik1:ChartDefaultView.ChartArea>
                        <telerik1:ChartArea LegendName="chartLegend">
                            <telerik1:ChartArea.AxisY>
                                <telerik1:AxisY StripLinesVisibility="Hidden" MinorTicksVisibility="Hidden" ExtendDirection="Up" />
                            </telerik1:ChartArea.AxisY>
                        </telerik1:ChartArea>
                    </telerik1:ChartDefaultView.ChartArea>
                </telerik1:ChartDefaultView>
            </telerik1:RadChart.DefaultView>
            <telerik1:RadChart.AnimationSettings>
                <telerik1:AnimationSettings ItemDelay="00:00:00" DefaultSeriesDelay="00:00:01" />
            </telerik1:RadChart.AnimationSettings>
             
            <telerik1:RadChart.SeriesMappings>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbPass, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Pass], Mode=TwoWay}" SeriesDefinition="{Binding Path=PassDefinition, Mode=TwoWay}">
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label" />
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbFail, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Fail], Mode=TwoWay}" SeriesDefinition="{Binding Path=FailDefinition, Mode=TwoWay}">
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>
                <telerik1:SeriesMapping LegendLabel="{Binding ElementName=cbReconstitution, Path=Content}" ItemsSource="{Binding Path=GraphRuntime[Reconstitution], Mode=TwoWay}" SeriesDefinition="{Binding Path=ReconstitutionDefinition, Mode=TwoWay}" >
                    <telerik1:SeriesMapping.ItemMappings>
                        <telerik1:ItemMapping DataPointMember="YValue" FieldName="Value"/>
                        <telerik1:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
                    </telerik1:SeriesMapping.ItemMappings>
                </telerik1:SeriesMapping>               
            </telerik1:RadChart.SeriesMappings>
        </telerik1:RadChart>


When the graph opened, all graph it's ok (view image).

If i select StackedBar100SeriesDefinition the axisY range changed, but when i return to SplineSeriesDefinition the graph is cut (like image problem.png).
This problem occurs and remain only if i select StackedBar100SeriesDefinition. For resolve the problem, software must be restarted.


Another problem with the SplineSeriesDefinition is that on the X-Axis the first label is cut (like problem.png image and 2.png image). Is there a way to resolve this issue?

Thanks in advance.
Francesco.
Nikolay
Telerik team
 answered on 25 Oct 2012
1 answer
469 views
My grid seems to be generating an empty column header before the first column and also after the last. How do I get rid of these? I've attached an image showing my issue. Thanks
Dimitrina
Telerik team
 answered on 25 Oct 2012
0 answers
86 views
no issue. it is working correctly.
Hitesh
Top achievements
Rank 1
 asked on 24 Oct 2012
2 answers
157 views
Hi, I have just started with using your components and I am very impressed with them.
The scheduleview in particular matches and upcoming project well.

I have one question now.
I have added some in xaml and found this to be working for<Canvas x:Name="canvas" MouseDown="Canvas_MouseDown" MouseUp="Canvas_MouseUp" MouseMove="Canvas_MouseMove">
<
telerik:RadScheduleView HorizontalAlignment="Left" Margin="12,12,0,0" Name="radScheduleView1" VerticalAlignment="Top" Height="469" Width="208" MouseRightButtonDown="rect1_MouseLeftButtonDown" NavigationHeaderVisibility="Collapsed" MinAppointmentHeight="100" VerticalScrollBarVisibility="Hidden" MinTimeRulerExtent="2800" MaxTimeRulerExtent="2800">

<telerik:RadScheduleView.ViewDefinitions>

<telerik:DayViewDefinition MinorTickLength="30min" MajorTickLength="1h"/>

</telerik:RadScheduleView.ViewDefinitions>

<telerik:RadScheduleView.RenderTransform>

<TranslateTransform></TranslateTransform>

</telerik:RadScheduleView.RenderTransform>

<telerik:RadScheduleView.DragDropBehavior>

<local:ScheduleViewDragDropBehavior/>

</telerik:RadScheduleView.DragDropBehavior>

</telerik:RadScheduleView>
</Canvas>

Besides normal config and drag'n drop I have added MouseRightButtonDown and RenderTransform as I am moving it arround on a canvas.

Now I would like to be able to add more schedulers at runtime and load them up with the same config. But I am having problem doing so.
Using this code I can create one
this.x = new Telerik.Windows.Controls.RadScheduleView(); this.x.Height = 469;
this.x.Width = 533;
this.x.CurrentDate = DateTime.Today;
var appointments3 = new ObservableCollection<Appointment>();
this.x.AppointmentsSource = appointments3;
RadScheduleViewCommands.SetDayViewMode.Execute(null, this.x);

canvas.Children.Add(

 

this.x);


I am using RadScheduleViewCommands to set dayview, but it is not working. So what I am doing wrong here?

Any help will be appreciated.

Secondly the bonus question.
Ideally I would like to instantiate new schedulers based on xaml template, I tried following a few example I could find on other web resources but non of them really worked well for me. Main problem here was that I could not set the drag'n drop behavior. But of cause that could be done after creating if needed.
If you happen to have any examples of this that would also be appreciated.

Best regards
Lasse
Lasse
Top achievements
Rank 1
 answered on 24 Oct 2012
5 answers
599 views
Hello,

I have noticed two separate issues when loading html documents into the WPF RadRichTextBox

The first issue is that loading a document with capitalized <STYLE> tags will not render at all, even if there are no styles specified.

The second issue is that the CSS style for "a:link, span.MsoHyperlink" that Microsoft Outlook adds to emails is being applied to the body tag of the resulting document.  This causes all text within the RadRichTextBox to be underlined, not just hyperlinks.

I have created a sample application to reproduce these issues.

<Window x:Class="RadRichTextBoxTestApp.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        SizeToContent="WidthAndHeight">
    <Window.Resources>
      <Style TargetType="{x:Type telerik:RadRichTextBox}">
        <Style.Setters>
          <Setter Property="Height" Value="100" />
          <Setter Property="Width" Value="300" />
        </Style.Setters>
      </Style>
    </Window.Resources>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box0}" Html="{Binding DocumentWithCapitalizedStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="0" x:Name="box0" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box1}" Html="{Binding DocumentWithLowerCaseStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="1" x:Name="box1" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box2}" Html="{Binding DocumentWithMsoHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="2" x:Name="box2" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box3}" Html="{Binding DocumentWithInlineHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="3" x:Name="box3" Margin="10"/>
    </Grid>
</Window>

using System.Windows;
 
namespace RadRichTextBoxTestApp
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            DataContext = new MainWindowViewModel();
            InitializeComponent();
        }
    }
 
    public class MainWindowViewModel
    {
        public string DocumentWithCapitalizedStyleTags
        {
            get { return "<html><head><STYLE></STYLE></head><body>HELLO WORLD!</body></html>"; }
        }
 
        public string DocumentWithLowerCaseStyleTags
        {
            get { return DocumentWithCapitalizedStyleTags.Replace("<STYLE", "<style").Replace("</STYLE","</style"); }
        }
 
        public string DocumentWithMsoHyperlinkStyles
        {
            get
            {
                return
@"
<html><head><style>
a:link, span.MsoHyperlink
    {mso-style-priority:99; color:blue; text-decoration:underline;}
</style></head><body>HELLO WORLD! <a href=""http://telerik.com"">Telerik</a></body></html>
";
            }
        }
 
        public string DocumentWithInlineHyperlinkStyles
        {
            get { return DocumentWithMsoHyperlinkStyles.Replace(", span.MsoHyperlink", ""); }
        }
    }
}

Boby
Telerik team
 answered on 24 Oct 2012
1 answer
194 views
Hello,

we currently have the following problem:

There is a table named ST_Classification and one named ST_Address, which have the following relationship:
ST_classification.PK_classification -> ST_Address.FK_classification

In a WPF-Application there is a DataFormComboBoxField which is populated with data from the ST_Classification table.
The moment the value is set to a new one an exception is thrown:
System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException was unhandled by user code
Message=Operation is not valid due to the current state of the object.


This is code in the xxx.designer.cs where the exception is thrown:
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FK_classification", DbType="BigInt", UpdateCheck=UpdateCheck.Never)]
        public System.Nullable<long> FK_classification
        {
            get
            {
                return this._FK_classification;
            }
            set
            {
                if ((this._FK_classification != value))
                {
                    if (this._ST_classification.HasLoadedOrAssignedValue)
                    {
                        throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
                    }
                    this.OnFK_classificationChanging(value);
                    this.SendPropertyChanging(); // <--- Exception is thrown!
                    this._FK_classification = value;
                    this.SendPropertyChanged("FK_classification");
                    this.OnFK_classificationChanged();
                }
            }
        }


This is the XAML-code for the DataFormComboBoxField:
<telerik:RadDataForm x:Name="RDF_ST_Addresse" ItemsSource="{Binding Items, ElementName=RG_ST_Partner}"
 AutoGenerateFields="False"
 EditEnding="RDF_ST_Addresse_EditEnding"
EditEnded="RDF_ST_Addresse_EditEnded"
DeletingItem="RDF_ST_Addresse_DeletingItem"
ValidatingItem="RDF_ST_Addresse_ValidatingItem"
AddingNewItem="RDF_ST_Addresse_AddingNewItem"
AddedNewItem="RDF_ST_Addresse_AddedNewItem" >
.
.
.
<telerik:DataFormComboBoxField DataMemberBinding="{Binding FK_classification, Mode=TwoWay}"  Name="DFCMB_classification"
Label="Klassifikation" IsReadOnly="False"
SelectedValuePath="PK_classification"
DisplayMemberPath="classification" Initialized="DFCMB_classification_Initialized" />

Here is the codeBehind for DataFormComboBoxField:
private void DFCMB_classification_Initialized(object sender, EventArgs e)
            {
                ((DataFormComboBoxField)sender).ItemsSource = from p in goDCAddach.ST_classifications orderby p.classification     select p ;
            }

 Thanks for any help in advance.

Greetings
Gerrit

Ivan Ivanov
Telerik team
 answered on 24 Oct 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
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?