Search Results

Search found 5 results on 1 pages for 'sayre collado'.

Page 1/1 | 1 

  • Resize Image thru Slider in Silverlight

    - by Sayre Collado
    Hello Guys, I've been playing with slider on silverlight. Now the result is this, a simple resizing image thru slider.  The Image below is the default size of my sample. And the second Image below are the result when the slider slide to right and top. The xaml layout are very simple: <Slider Minimum="80" Maximum="238" Height="23" HorizontalAlignment="Center" Name="sldBottom" Width="246" Margin="27,226,27,1" /> <Slider Height="212" Minimum="80" Maximum="209" Name="sldRight" Width="28" Orientation="Vertical" Margin="271,9,1,29" /> <Image HorizontalAlignment="Center" Name="image1" Stretch="Fill" VerticalAlignment="Center" Source="/GBLOgs2;component/Images/logosai.JPG" Height="{Binding ElementName=sldRight,Path=Value}" Width="{Binding ElementName=sldBottom,Path=Value}" /> The Image1 Height are depending to the maximum value of sldRight and its value same with the situation of Image1 Width. The Image1 Height/Width = {Binding ElementName="NAME OF THE SLIDER", Path="THE VALUE OF SLIDER"}. When you slide the slider the image will resize. And thats all. Happy Programming.

    Read the article

  • Autocomplete in Silverlight with Visual Studio 2010

    - by Sayre Collado
    Last week I keep searching on how to use the autocomplete in silverligth with visual studio 2010 but most of the examples that I find they are using a textbox or combobox for the autocomplete. I tried to study those examples and apply to the single autocomplete from tools on my silverlight project. And now this is the result. I will use a database again from my previous post (Silverlight Simple DataBinding in DataGrid) to show how the autocomplete works with database. This is the output: First, this is the setup for my autocomplete: //The tags for autocompletebox on XAML Second, my simple snippets: //Event for the autocomplete to send a text string to my function private void autoCompleteBox1_KeyUp(object sender, KeyEventArgs e) { autoCompleteBox1.Populating += (s, args) => { args.Cancel = true; var c = new Service1Client(); c.GetListByNameCompleted +=new EventHandler(c_GetListByNameCompleted); c.GetListByNameAsync(autoCompleteBox1.Text); }; } //Getting result from database void c_GetListByNameCompleted(object sender, GetListByNameCompletedEventArgs e) { autoCompleteBox1.ItemsSource = e.Result; autoCompleteBox1.PopulateComplete(); } The snippets above will show on how to use the autocompleteBox using the data from database that bind in DataGrid. But what if we want to show the result on DataGrid while the autocomplete changing the items source? Ok just add one line to c_GetListByNameCompleted void c_GetListByNameCompleted(object sender, GetListByNameCompletedEventArgs e) { autoCompleteBox1.ItemsSource = e.Result; autoCompleteBox1.PopulateComplete(); dataGrid1.ItemsSource = e.Result; }

    Read the article

  • VISUAL STUDIO 2010 GLOBAL LAUNCH

    - by Sayre Collado
    Hello Guys, The Visual Studio 2010 is here. You can test by downloading the free trial at this link http://www.microsoft.com/visualstudio/en-us/download and view the products features in this link http://www.microsoft.com/visualstudio/en-us/products . You can even watch the live launch at http://www.microsoft.com/visualstudio/en-us/watch-it-live Happy Programming.

    Read the article

  • Basic Mouse Features in Silverlight

    - by Sayre Collado
    Hi Guys, I have basic sample on how to use some features of mouse events in Silverlight. The picture. The Mouse Activity Log is to record the all activity done on the projects. My simple snippets on how to add on the textbox is:         protected void MessageLog(string msg)         {             txtMouseLog.Text += msg;         }   For the Mouse Wheel sample this is the snippets:         private void chkMouseWheel_Checked(object sender, RoutedEventArgs e)         {             image1.MouseWheel += new MouseWheelEventHandler(image1_MouseWheel);         }           void image1_MouseWheel(object sender, MouseWheelEventArgs e)         {             ImgScale.ScaleX = e.Delta > 0 ? ImgScale.ScaleX * 1.5 : ImgScale.ScaleX * 0.8;             ImgScale.ScaleY = e.Delta > 0 ? ImgScale.ScaleY * 1.5 : ImgScale.ScaleY * 0.8;               e.Handled = true;         }    And the XAML:        <Image Height="139" Name="image1" Stretch="Fill" Width="178" Source="/GBLOgs1;component/Images/Sunset.jpg">            <Image.RenderTransform>                 <ScaleTransform x:Name="ImgScale"></ScaleTransform>            </Image.RenderTransform>        </Image     I have also the showing of mouse position:           private void Mouse_MouseMove(object sender, MouseEventArgs e)         {             Point point = e.GetPosition(this);             lblMouseLocation.Content = "X: " + point.X + "and Y: " + point.Y;         }           private void checkBox1_Checked(object sender, RoutedEventArgs e)         {             lblMouseLocation.Visibility = Visibility.Visible;             MessageLog("Mouse Location Visible\n");         }           private void checkBox1_Unchecked(object sender, RoutedEventArgs e)         {             lblMouseLocation.Visibility = Visibility.Collapsed;             MessageLog("Mouse Location Collapsed\n");            And even the counting of clicked event:           int clicked = 0;         private void LayoutRoot_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)         {             Point point = e.GetPosition(this);             clicked++;               string msg = "Mouse Clicked " + clicked.ToString() + " time(s) " +                                     "Mouse Location X and Y: " + point.X + " " + point.Y + "\n";               MessageLog(msg);         }     And now the result of above snippets. Happy Programming.

    Read the article

1