Search Results

Search found 8559 results on 343 pages for 'silverlight navigation'.

Page 74/343 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Silverlight 4 XAML Collections

    - by mattduffield
    Hello, I have authored some custom classes that I would like to create using XAML: <Grid Width="300" Height="300"> <l:DashboardTable> <l:DashboardTable.DashboardTableQuery> <dq:DashboardTableQuery ConnectionString="Data Source=bunkerhill;Initial Catalog=emgov_data;User Id=emgovadmin;Password=p@$$word;" Query="select datename(month, cr_tb_DateDue) AS Month, sum(cr_tb_AmountTransaction) AS Total from cr_tb_transactionbill where Year(cr_tb_DateDue) = 2005 and Month(cr_tb_DateDue) IN (1,2,3,4) group by datename(month, cr_tb_DateDue)" > <dq:DashboardTableQuery.DataColumns> <dq:DataColumn ColumnName="Month" ColumnOrder="0" Label="Month" /> <dq:DataColumn ColumnName="Total" ColumnOrder="1" Label="Total" /> </dq:DashboardTableQuery.DataColumns> </dq:DashboardTableQuery> </l:DashboardTable.DashboardTableQuery> </l:DashboardTable> </Grid> The problem is that I get a XamlParseException when I try to run this XAML. I have determined it is when it gets to the dq:DataColumn element. It seems like this is only happening when I have a property that then has a collection and then several items in the collection that I am getting this issue. Has any encountered anything similar? I am try to achieve this all in XAML declaratively.

    Read the article

  • how to write silverlight threading function in another file or project

    - by Piyush
    I am using three tier architecture.I have SilverlightUI and UIController two projects.SilverlightUI contains only UI pages and controls while UIController contains all proxies of WCF services. Now I have created threads to update my controls dynamically and to do processing parallel.AS the requirement I want to define all functionality of threads in UIController projects.What should I do? Currenty what I am doing - private void Button_Click(object sender, RoutedEventArgs e) { StartThreads(); } private void StartThreads() { private Thread _thread1; _thread1 = new Thread(DoThread1); _thread1.Start(); } public static void DoThread1() { _data1.Dispatcher.BeginInvoke(delegate() { _data1.Text = _count1.ToString(); }); System.Threading.Thread.Sleep(1000); } I Want to write DoThread1() method in UIController project and call that function from here button_click()

    Read the article

  • Adding Silverlight MimeType using adsutil

    - by Rich
    I have a script that creates an app pool, web site - and then I want to use adsutil to add the .xap MimeType. I see this: cscript adsutil.vbs set W3SVC//Root/MimeMap “.extension,mimetype” However, since I am creating the web site in the same script I will not know the ID. Would anyone know how to do this with adsutil? Thanks, Rich

    Read the article

  • One Common event for all controls in Silverlight

    - by Veejay
    I have a couple of textblock controls and all of them are calling a single event. But i have to wire all of them invidividually using TextBlock1.MouseMove += new MouseEventHandler(TextBlock_MouseMove); TextBlock2.MouseMove += new MouseEventHandler(TextBlock_MouseMove); TextBlock3.MouseMove += new MouseEventHandler(TextBlock_MouseMove); Is there a way that I can apply the mouse move to all TextBlock without wiring them one by one

    Read the article

  • The scroll viewer is not updating in silverlight

    - by Malcolm
    I have an image inside scroll viewer and i have a control for zooming the image and in zooming event i change the scale of an image ,as below : void zoomSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { scale.ScaleX = e.NewValue; scale.ScaleY = e.NewValue; //scroll is a name of scrolviewer scroll.UpdateLayout(); } And a xaml below <Grid x:Name="Preview" Grid.Column="1"> <Border x:Name="OuterBorder" BorderThickness="1" BorderBrush="#A3A3A3" > <Border x:Name="InnerBorder" BorderBrush="Transparent" Margin="2" > <Grid Background="White" > <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <ScrollViewer x:Name="scroll" HorizontalScrollBarVisibility="Auto" Grid.Column="0" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Themes:ThemeManager.StyleKey="TreeScrollViewer"> <Image Source="../charge_chargeline.PNG" > <Image.RenderTransform> <CompositeTransform x:Name="**scale**" /> </Image.RenderTransform> </Image> </ScrollViewer> <Border HorizontalAlignment="Center" CornerRadius="0,0,2,2" Width="250" Height="24" VerticalAlignment="Top"> <Border.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="#CDD1D4" Offset="0.0"/> <GradientStop Color="#C8CACD" Offset="1.0"/> </LinearGradientBrush> </Border.Background> <ChargeEntry:Zoom x:Name="zoominout" /> </Border> </Grid> </Border> </Border> </Grid>

    Read the article

  • Silverlight 3 ArcSegment to always draw circle's

    - by kapaboo
    Hi everyone, Ok, my arcSegment must always draw Circle's. For this reason I calculate the Arc's Width with the following formula: arcXRadius = (4 * Math.Pow(height, 2) + Math.Pow(distanceArcPoints, 2)) / (8 * height); so Arcs.Size = (arcXRadius,height) But seems that the height is scaled down when drawn. I want to add a small Circle to the Arc's middle (highest point) so when you drag it it changes the arc Height but also changes the Width so it will remain a circle. Here's how I calculate the Circle's (highest) point: Point middlePoint = GetMiddlePoint(arcPointA,arcPointB); double arcYRadius = arcSegment.Size.Height; if (arcYRadius <= 0) return middlePoint; double angle = arcSegment.RotationAngle; Point ellinewPoint = new Point(); ellinewPoint.X = Math.Cos((angle + 90) * Math.PI / 180) * arcYRadius + middlePoint.X; ellinewPoint.Y = Math.Sin((angle + 90) * Math.PI / 180) * arcYRadius + middlePoint.Y; Until Arc's.Size.Height Property gets Closer to the Width my Circle is not at the right Point. So maybe someone can give me a hint or tell me what am I doing wrong. Cheers, kapaboo

    Read the article

  • Silverlight: Binding a custom control to an arbitrary object

    - by Ryan Bates
    I am planning on writing a hierarchical organizational control, similar to an org chart. Several org chart implementations are out there, but not quite fit what I have in mind. Binding fields in a DataTemplate to a custom object does not seem to work. I started with a generic, custom control, i.e. public class NodeBodyBlock : ContentControl { public NodeBodyBlock() { this.DefaultStyleKey = typeof(NodeBodyBlock); } } It has a simple style in generic.xaml: <Style TargetType="org:NodeBodyBlock"> <Setter Property="Width" Value="200" /> <Setter Property="Height" Value="100" /> <Setter Property="Background" Value="Lavender" /> <Setter Property="FontSize" Value="11" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="org:NodeBodyBlock"> <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="4" BorderBrush="Black" BorderThickness="1" > <Grid> <VisualStateManager/> ... clipped for brevity </VisualStateManager.VisualStateGroups> <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> My plan now is to be able to use this common definition as a base definition of sorts, with customized version of it used to display different types of content. A simple example would be to use this on a user control with the following style: <Style TargetType="org:NodeBodyBlock" x:Key="TOCNode2"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Path=NodeTitle}"/> </StackPanel> </DataTemplate> </Setter.Value> </Setter> </Style> and an instance defined as <org:NodeBodyBlock Style="{StaticResource TOCNode2}" x:Name="stTest" DataContext="{StaticResource DummyData}" /> The DummyData is defined as <toc:Node NodeNumber="mynum" NodeStatus="A" NodeTitle="INLine Node Title!" x:Key="DummyData"/> With a simple C# class behind it, where each of the fields is a public property. When running the app, the Dummy Data values simply do not show up in the GUI. A trivial test such as <TextBlock Text="{Binding NodeTitle}" DataContext="{StaticResource DummyData}"/> works just fine. Any ideas around where I am missing the plot?

    Read the article

  • Cancelling Two Way Data Binding In Silverlight

    - by DaveB
    I have an ObervableCollection of data items. This collection is bound to a ListBox. When the user selects a item from the listbox and clicks the Edit button a UserControl with the details of that item is displayed with the various properties bound to text boxes. Each binding mode is set for TwoWay. On this details UserControl, I would like to implement 2 buttons, OK and Cancel. This would be consistent with UIs in Windows. This application is using the Model-View_ViewModel pattern. Here is my question: 1) How can I implement the Cancel button when all the changes have already been committed?

    Read the article

  • Silverlight: Creating a round button template

    - by Jeremy
    I decided to try making a circular button, so using expression blend, I dropped a button control on my xaml. I then created a template from it by choosing "Edit Control Parts (Template)" - "Edit a Copy". I am trying to design it so that the left and right sides of the button were always perfect semi circles, so that no matter how tall or wide the button grew, the corner radius would max out at either half the width or half the length of the button, depending on which was smaller. That way, if the button was stretched tall, the top and buttom would be perfect half circles, and if the button was stretched wide, the left and right would be perfect half circles. Is it possible to do this?

    Read the article

  • Force Binding Update Silverlight

    - by Matt
    How can I force my objects DataContext bindings to update? I'm using an event on a grid, and binding updates are not being processed before my event fires. Any cheap tricks to get around this? In the end I can always do things the old manual way of getting the values from my textboxes and updating my object, but it'd be nice to have binding do it for me.

    Read the article

  • GetHashCode Method reliability in Silverlight/WP7.1

    - by abhinav
    I am attempting to hash and keep(the hash) an object of type IEnumerable<anotherobject> which has about a 1000 entries. I'll be generating another such object, but this time I'd like to check for any changes in the values of the entries using the hash codes of the two objects. Basically, I was wondering if GetHashCode() is apt for this, both from a performance perspective and reliability perspective (getting different values for different object values and same values for same object values, always). If I have to override it, what would be a good way to do so, does it always depend on the type of anotherobject and what Equals means when comparing two anotherobjects? Is there a generic way to do it? This concern is because my object can be quite big.

    Read the article

  • CheckBox in silverlight

    - by Malcolm
    I have 4 check boxes and by default they are checked and depending on these check boxes i have to show a value some where else. for ex: suppose for first checkbox i say 1, second 2 ,third 3 and fourth 4 so initially i store this value in a string name dg="1,2,3,4" if the user unchecks the second check box the value in my dg must be showing : dg="1,3,4" And again if the user checks the second chekbox , my dg must store the value : dg="1,2,3,4" How to achieve this? TX in advance

    Read the article

  • silverlight drag move delta

    - by Notter
    Hi, this should be pretty simple, but i forgot how to do it... I've got a Border on a canvas, and i want to be able to move it around. i could do this easily with the MouseDragElementBehavior. but i don't want smooth movment, i want to to jump on the Y axis in an offset of 30. and on the X in 193. And it's done in MVVM, so i guess i should implement it as a behavior, right? anyway, how do i do this?

    Read the article

  • How can I bind to a helper property in Silverlight

    - by Matt
    For the sake of argument, here's a simple person class public class Person : DependencyObject, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public static readonly DependencyProperty FirstNameProperty = DependencyProperty.Register( "FirstName", typeof ( string ), typeof ( Person ), null ); public static readonly DependencyProperty LastNameProperty = DependencyProperty.Register( "LastName", typeof( string ), typeof( Person ), null ); public string FirstName { get { return ( string ) GetValue( FirstNameProperty ); } set { SetValue( FirstNameProperty, value ); if(PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs( "FirstName" )); } } public string LastName { get { return ( string ) GetValue( LastNameProperty ); } set { SetValue( LastNameProperty, value ); if ( PropertyChanged != null ) PropertyChanged( this, new PropertyChangedEventArgs( "LastName" ) ); } } } I want to go about creating a readonly property like this public string FullName { get { return FirstName + " " + LastName; } } How does binding work in this scenario? I've tried adding a DependancyProperty and raised the PropertyChanged event for the fullname. Basically I just want to have a property that I can bind to that returns the fullname of a user whenever the first or last name changes. Here's the final class I'm using with the modifications. public class Person : DependencyObject, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public static readonly DependencyProperty FirstNameProperty = DependencyProperty.Register( "FirstName", typeof ( string ), typeof ( Person ), null ); public static readonly DependencyProperty LastNameProperty = DependencyProperty.Register( "LastName", typeof( string ), typeof( Person ), null ); public static readonly DependencyProperty FullNameProperty = DependencyProperty.Register( "FullName", typeof( string ), typeof( Person ), null ); public string FirstName { get { return ( string ) GetValue( FirstNameProperty ); } set { SetValue( FirstNameProperty, value ); if ( PropertyChanged != null ) { PropertyChanged( this, new PropertyChangedEventArgs( "FirstName" ) ); PropertyChanged( this, new PropertyChangedEventArgs( "FullName" ) ); } } } public string LastName { get { return ( string ) GetValue( LastNameProperty ); } set { SetValue( LastNameProperty, value ); if ( PropertyChanged != null ) { PropertyChanged( this, new PropertyChangedEventArgs( "LastName" ) ); PropertyChanged( this, new PropertyChangedEventArgs( "FullName" ) ); } } } public string FullName { get { return GetValue( FirstNameProperty ) + " " + GetValue( LastNameProperty ); } } }

    Read the article

  • Cant insert a object into a silverlight databound combo box

    - by Steve
    Hi Until recently I had a combo box that was bound to a Linq queried IEnumerable of a DataService.Obj type in the bind method, and all worked fine private IEnumerable<DataService.Obj> _GeneralList; private IEnumerable<DataService.Obj> _QueriedList; private void Bind() { _GeneralList = SharedLists.GeneralList; _QueriedList = _GeneralList.Where(q =>q.ID >1000); cmbobox.ItemsSource = _QueriedList; } Then I had to change the method to insert a new obj and set that object as the default obj and now I get a "System.NullReferenceException: Object reference not set to an instance of an object" exception. I know this has to do with inserting into a linq queried ienumerable but I cant fix it. Any help will be gratefully received. private IEnumerable<DataService.Obj> _GeneralList; private IEnumerable<DataService.Obj> _QueriedList; private void Bind() { _GeneralList = SharedLists.GeneralList; _QueriedList = _GeneralList.Where(q =>q.ID >1000); cmbobox.ItemsSource = _QueriedList; DataService.Obj info = new DataService.Obj(); info.ID = "0"; (cmbobox.ItemsSource as ObservableCollection<DataService.Obj>).Insert(0,info); cmbobox.SelectedIndex = 0; } Thanks in advance

    Read the article

  • Binding to a List<object> in silverlight problem.

    - by cw
    Hello, Can someone suggest what I am doing wrong? Basically I have a List Items, when an item gets added to the list I am resetting the collection to the viewmodel property. The only way I can get it to work is if I null the member object out before reassigning the binding. Any suggestions on how to go about updating a UI when an item gets added to a List? public List<Item> RegisteredItems { get { return m_vRegisteredItems; } set { m_vRegisteredItems= null; NotifyPropertyChanged("RegisteredItems"); m_vRegisteredItems= value; NotifyPropertyChanged("RegisteredItems"); } }

    Read the article

  • very weird problem concerning date and time in silverlight + ria services

    - by Patrick LHM
    Hello Friends i'm facing a very weird problem in sliverlight 4 + RIA Services, or maybe it's not weird and i'm just a newbie anyway i hope someone here can help, the problem is the following i've created a function on the server side inside the domain service this function is very simple and has a line in it that adds the server current date and time to the database (it's an HR application and employees should sign in and out thrue it each from it's own pc ) Emp.TimeOut = system.DateTime.now (C# syntax) the weird part is that for some users it always adds 3 hours to the current time(exp if he signes out at 5 it shows 8) and for others it works perfectly. the server and all the stations in the company have exactly the same time settings and the same time zone, and anyway my fucntion is on the server side so it should no be realted to the users time. any ideas why this is happening ? i've bin trying to find out why for days now but with no luck

    Read the article

  • How do I stop cropping of a transformed (scaled) image in a grid (silverlight)

    - by Jeremy
    I have a grid with an image in it. Initially, the image is larger than the grid, so it gets cropped which is fine, but if I apply a scaling transform to causing the image to shrink, the portion that was initally cropped remains cropped, but I want it displayed now, because it would fit in the grid. I concidered putting my image in a canvas, but I want it centered vertically and horizontally, which is giving me trouble, so I switched to a grid.

    Read the article

  • Icons in Silverlight: Images vs. Vectors

    - by Shnitzel
    I like using the vector drawing feature of Expression Blend to create icons. That way I can change colors easily on my icons without having to resort to an image editor. But my question is... Say I have a treeview control that has an icon next to each tree element and say I have hundreds of elements. Do you think using images is faster - performance wise than using vector icons? B/c I'd rather use vectors but I'm wondering about performance concerns.

    Read the article

  • Silverlight - WCF Enable Binary Encoding

    - by Villager
    Hello, I have a WCF service that is returning a lot of data. I want to compress that information so I thought that using BinaryEncoding would be appropriate. Currently, I have a binding setup in my web.config as follows: <binding name="myCustomBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00"> <binaryMessageEncoding /> <httpTransport maxReceivedMessageSize="8388608" maxBufferSize="8388608"> <extendedProtectionPolicy policyEnforcement="Never" /> </httpTransport> </binding> In my ServiceReferences.clientconfig file, I have the following binding settings: <binding name="CustomBinding_MyService"> <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <extendedProtectionPolicy policyEnforcement="Never" /> </httpTransport> </binding> Oddly, this configuration will not work. As soon as I remove the <binaryMessageEncoding /> line from the web.config, everything works fine. My question is, how do I use binary message encoding? Is there something I need to configure in my ServiceReferences.clientconfig? Thank you

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >