Telerik Forums
UI for WPF Forum
1 answer
214 views
Is there any way to force a refresh/rebuild of the chart so that the labels are correctly positioned after a runtime change of the font size?  Ideally, in a MVVM way?

Currently, if you bind the font size to a property in the ViewModel and change it, the chart is not repositioned properly to accommodate the change in size.  See attached pics showing undesirable results of changing the font size, both when increasing or decreasing from the initial size.

Here's some code:

<chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis FontFamily="Segoe UI"
                        FontSize="{Binding AxisFontSize}"
                        Title="{Binding AxisTitle}"
                        Minimum="0"
                        Maximum="{Binding AxisMaxValue}"
                        LabelFormat="{Binding AxisLabelFormat}">
                </chartView:LinearAxis>
</chart:RadCartesianChart.VerticalAxis>

public double AxisFontSize
{
    get
    {
        return this._axisFontSize;
    }
    set
    {
        if ( this._axisFontSize != value )
        {
            this._axisFontSize = value;
            this.OnPropertyChanged( "AxisFontSize" );
            this.OnPropertyChanged( "AxisLabelFormat" );
        }
    }
}

What is the best way to accomplish a dynamic font size change?
Peshito
Telerik team
 answered on 03 Nov 2014
4 answers
266 views
Hi,
I'm using this really great control of RadPropertyGrid to generate grids dynamically for several types of objects.
Lately, I tried to add object with property of dictionary (i.e. Dictionary<int, string> and no success on this try...

What should I do?

See my example at property called ItemsData (which is Dictionary<long, string>)
Maya
Telerik team
 answered on 03 Nov 2014
13 answers
800 views
Hi,

I want to edit a row on click of a Button which will be placed inside the RadGridView control and make that particular row highlighted.

Is there any way, in which I can achieve this functionality.

Early, code sample to this solution will be highly appreciated.

Thanks & Regards,
Hirak
Mark
Top achievements
Rank 1
 answered on 31 Oct 2014
4 answers
212 views
  Hello,

I have a ItemTemplate  with a Textblock with TextWrapping="Wrap". Since I update Telerik to the last version, the text is wrapping not normaly, it doesn't fill all the width of the Textblock. I don't understand why, is there something that change in the Tile Style that make this happen?

Thanks in advance for your help.

<DataTemplate x:Key="DashAppTileItemTemplate">      
        <Grid  VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Source="{Binding Path=Image , Mode=OneWay, TargetNullValue=Category.Image}"  Margin="5,0" />
            <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Text="{Binding Path=Libelle, Mode=OneWay}" FontSize="18" />
            <TextBlock  Grid.Row="1" Grid.Column="1" Text="This is my very long text" TextWrapping="Wrap" />
        </Grid>
    </DataTemplate>




Georges
Top achievements
Rank 1
 answered on 31 Oct 2014
4 answers
301 views
I am using a GridView with a QueryableDataServiceCollectionView data source in a MVVM WPF application.

Relevant data involved (Entity Framework is in use on the server) are SecurityDomain, SecurityRole and SecurityDomainSecurityRole.

SecurityDomain and SecurityRole are EntityFramework entities with corresponding database tables.

SecurityDomainSecurityRole is a navigation property that is represented in the database as a table, but not as an EntityFramework entity. This navigation property represents the many to many relationship between SecurityDomain and SecurityRole.

I use the "expand" property of the QueryableDataServiceCollectionView to retrieve SecurityDomains along with each of their related SecurityRoles.

SecurityDomains = new QueryableDataServiceCollectionView<SecurityDomain>(odataServiceD.Service, odataServiceD.Entity);
SecurityDomains.Expand = "SecurityRoles";

Retrieve into grid works fine, as does update and delete of SecurityDomains.


The problem: When I add an existing SecurityRole to a SecurityDomain (that was not previously associated with that SecurityRole) and SubmitChanges(), the OData controller method on the server, "SecurityDomainController.PostToSecurityRoles" executes and successfully adds a row into the database table SecurityDomainSecurityRole, but whatever I return from this method crashes the client.


Using method signature "public IHttpActionResult PostToSecurityRoles([FromODataUri] int key, SecurityRole securityRole)", the following returns result in a "The context is already tracking a different entity with the same resource Uri." client crash:

return Created(securityRole); // securityRole is the parameter.

return Created(sr); // sr is the newly created securityRole object.

var location = String.Format("{0}/{1}({2})/{3}({4})", Request.RequestUri, "SecurityDomains", key, "SecurityRoles", sr.Id);
return Created(location, sr);


With the same signature, this return results in a "The response to this POST request did not contain a 'location' header. That is not supported by this client." client crash.

return StatusCode(HttpStatusCode.NoContent);


With the same signature, using a "Created(SecurityDomain)" style return result in  "No NavigationLink factory was found for the navigation property 'SecurityRoles' from entity type
'DB.Domain.Entities.SecurityDomain' on entity set 'SecurityRole'. Try calling HasNavigationPropertyLink on the EntitySetConfiguration" client crashes. These are the returns like this:

return Created(businessLayer.SecurityDomain(key));

var sd = businessLayer.WithSecurityRoles(key);
return Created(sd);


If I change the method signature to "public HttpResponseMessage PostToSecurityRoles([FromODataUri] int key, SecurityRole securityRole)", the following returns result in "The response to this POST request did not contain a 'location' header. That is not supported by this client." client crashes:

return Request.CreateResponse(HttpStatusCode.Created, securityRole);

return Request.CreateResponse(HttpStatusCode.NoContent);


So my question is basically what does the GridView/QueryableDataServiceCollectionView want to get back from the Odata controller? If the Grid just kept running and refreshed, everything would be fine. The database is getting updated correctly.

Thanks.
Greg
Top achievements
Rank 1
 answered on 30 Oct 2014
3 answers
125 views
Hi,

I am using XmlDataProvider to bind the contents of an xml file to treeview. My question is if I make any changes to xml file manually, do I need to recompile it everytime. Or the application will correctly refer to the Source path where I have updated the xml.


Thanks
Divya
Petar Mladenov
Telerik team
 answered on 30 Oct 2014
3 answers
339 views
I have a MEF Prism region defined in a RadPane.  As long as the pane is docked in the DocumentHost, everything works correctly.  However, if I pull the pane out of the host so that it is floating outside of the main application, Prism navigation does not work when I call RegionManager.RequestNavigate.  I then drag the pane back into the host, and navigation starts working, again.  Is there any known reason why navigation would work in one state but not the other?  Is there a work around?  I am running Telerik 2014 Q1.


<telerik:RadPane Header="Document Viewer" Name="ChartViewerPane"
                    telerik:RadDocking.SerializationTag="MyPane">
    <telerik:RadPane.Content>
        <ContentControl regions:RegionManager.RegionName="{x:Static inf:RegionNames.MyRegionName}"></ContentControl>
    </telerik:RadPane.Content>
</telerik:RadPane>

I tried following the directions in this blog post, but nothing changed once I added the code to my solution.

http://blogs.telerik.com/xamlteam/posts/13-12-11/using-raddocking-with-prism-in-wpf-silverlight
Максимейко
Top achievements
Rank 1
 answered on 30 Oct 2014
2 answers
212 views
I just upgraded from 2014 Q2 to 2014 Q3 for WPF and I am running into an issue that looks to be specific to the Windows 8 Touch theme on the TabControl.  I set the application wide theme using the following in my first window that loads:

Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.Windows8TouchTheme();

On a subsequent window that loads that contains a RadTabControl, the application will throw an exception:
System.Windows.Markup.XamlParseException : Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.
The inner exception is:
System.Xaml.XamlParseException : Prefix 'telerik1' does not map to a namespace.

The exception is throw from the ShowDialog() method being called on that window.  The kicker is that if I comment out my application-wide theme or switch it to the standard Windows 8 theme, the issue goes away, but obviously I am not using the theme I would like to.

Anybody run into this before or have any suggested workarounds to it?
Milena
Telerik team
 answered on 30 Oct 2014
9 answers
173 views
Hi,

in my project I have a chart with multiple bars, each bar have a label. I generated and ItemClick event to do something when the user click on a bar. I would like to know if it's possible to do the samething when the user click on each bar label because sometime the height of the bars is not visible and we can see only theirs labels.

Thank's
Petar Marchev
Telerik team
 answered on 30 Oct 2014
5 answers
231 views
Hi, 
currently I have a little issue while the Drag&Drop actions. I use 2 GridViews, from one of them the user can drag elements an drop it on a separate control (not the second GridView). The problem is that the mouse over symbol indicates that the user can drop the item on the second grid, which he can't ... 

How can I disable the drop option and show the user he can't drop elements on the second grid? 

Thanks!
Karlheinz
Top achievements
Rank 1
 answered on 30 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?