当前位置: 首页>>代码示例>>C#>>正文


C# Controls.Viewbox类代码示例

本文整理汇总了C#中System.Windows.Controls.Viewbox的典型用法代码示例。如果您正苦于以下问题:C# Viewbox类的具体用法?C# Viewbox怎么用?C# Viewbox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Viewbox类属于System.Windows.Controls命名空间,在下文中一共展示了Viewbox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnApplyTemplate

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _viewbox = Template.FindName("ViewBoxInternal", this) as Viewbox;
            _label = Template.FindName("TextBlockInternal", this) as TextBlock;
        }
开发者ID:dbremner,项目名称:ScreenToGif,代码行数:7,代码来源:ImageRadioButton.cs

示例2: AddCustomTab

        public void AddCustomTab(TabControl parentTabControl, string name, UserControl userControl, bool useViewBox = true)
        {
            if (useViewBox)
            {
                Viewbox viewBox = new Viewbox();
                viewBox.Child = userControl;
                viewBox.Width = double.NaN;
                viewBox.Height = double.NaN;

                TabItem tabItem = new TabItem();
                tabItem.Header = name;
                tabItem.Content = viewBox;
                CopyFontData(tabItem1, tabItem);
                parentTabControl.Items.Add(tabItem);
            }
            else
            {
                userControl.Width = double.NaN;
                userControl.Height = double.NaN;
                userControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                userControl.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

                Grid grid = new Grid();
                grid.Width = double.NaN;
                grid.Height = double.NaN;
                grid.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                grid.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

                grid.Children.Add(userControl);
                Grid.SetColumn(userControl, 0);
                Grid.SetRow(userControl, 0);

                AddCustomTab(parentTabControl, name, grid);
            }
        }
开发者ID:vesteksoftware,项目名称:VT5021,代码行数:35,代码来源:ManualExtended.cs

示例3: AddGame

 public void AddGame(GameModel game)
 {
     var gameControl = new GameControl {Style = GameStyle, DataContext = game};
     var viewbox = new Viewbox {Style = GameViewBoxStyle};
     viewbox.Child = gameControl;
     Grid.Children.Add(viewbox);
 }
开发者ID:zeldafreak,项目名称:Area51,代码行数:7,代码来源:GamePage.xaml.cs

示例4: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.viewbox1 = ((System.Windows.Controls.Viewbox)(target));
     return;
     case 2:
     
     #line 10 "..\..\Window1.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 11 "..\..\Window1.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 12 "..\..\Window1.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:NCCUCS-Windows-Programming,项目名称:FruitMan,代码行数:33,代码来源:Window1.g.i.cs

示例5: UpdateSize

 public static void UpdateSize(FrameworkElement element, double availableWidth)
 {
     var vbox = new Viewbox { Child = element };
     vbox.Measure(new Size(availableWidth, 2000));
     vbox.Arrange(new Rect(0, 0, availableWidth, 2000));
     vbox.UpdateLayout();
 }
开发者ID:modulexcite,项目名称:printengine,代码行数:7,代码来源:UIUtil.cs

示例6: ZoomInstrument

        public static void ZoomInstrument(MouseWheelEventArgs e, Viewbox vb) {
            double delta = e.Delta;
            double factor = delta > 0 ? delta / 100 : (100 / -delta);

            vb.Width = vb.ActualWidth * factor;
            vb.Height = vb.ActualHeight * factor;

        }
开发者ID:ychost,项目名称:PowerControlSimulation,代码行数:8,代码来源:IInst_FrontPanel.cs

示例7: SetScaleFactor

        public static void SetScaleFactor(double scaleFactor,UserControl equi,Viewbox vb) {
            Point disPoint = new Point();
            disPoint.X = (scaleFactor - 1.0) * vb.ActualWidth / 2 ;
            disPoint.Y = (scaleFactor - 1.0) * vb.ActualHeight / 2;
            vb.Width = vb.ActualWidth * scaleFactor;
            vb.Height = vb.ActualHeight * scaleFactor;

        //setDisplacement(equi,disPoint);
        }
开发者ID:ychost,项目名称:PowerControlSimulation,代码行数:9,代码来源:EquipmentScaleUtilis.cs

示例8: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/AppliDemo;component/UserControlStars.xaml", System.UriKind.Relative));
     this.userControlStars = ((System.Windows.Controls.UserControl)(this.FindName("userControlStars")));
     this.LayoutRoot = ((System.Windows.Controls.Viewbox)(this.FindName("LayoutRoot")));
     this.StarRegularPolygon = ((Microsoft.Expression.Shapes.RegularPolygon)(this.FindName("StarRegularPolygon")));
 }
开发者ID:Jordan-Bustos,项目名称:AppliWindowsPhoneDemo,代码行数:10,代码来源:UserControlStars.g.i.cs

示例9: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LocalD;component/Pages/CameraPage.xaml", System.UriKind.Relative));
     this.CameraViewbox = ((System.Windows.Controls.Viewbox)(this.FindName("CameraViewbox")));
     this.ViewfinderCanvas = ((System.Windows.Controls.Canvas)(this.FindName("ViewfinderCanvas")));
     this.ViewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("ViewfinderBrush")));
 }
开发者ID:kfwls,项目名称:LocalD,代码行数:10,代码来源:CameraPage.g.i.cs

示例10: Setup

		public void Setup()
		{
			TestPanel.Width = 100;
			TestPanel.Height = 100;
			Child = new LayoutPoker ();
			Viewbox = new Viewbox();

			// The default template is applied when the item is added to the tree.
			TestPanel.Children.Add(Viewbox);
			TestPanel.Children.Clear();

			Viewbox.Child = Child;
		}
开发者ID:kangaroo,项目名称:moon,代码行数:13,代码来源:ViewBoxTest.cs

示例11: ImageSourceChanged

        private void ImageSourceChanged(DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            ((Image)_currentInvisible.Child).Source = ImageSource;
            FadeImage(_currentInvisible, FadeDuration, 1.0);
            FadeImageInstant(_currentVisible, FadeDuration, 0.0);

            SetZIndex(_currentInvisible, FadeDuration, 1);
            SetZIndex(_currentVisible, FadeDuration, 2);

            Viewbox tmp = _currentInvisible;
            _currentInvisible = _currentVisible;
            _currentVisible = tmp;
        }
开发者ID:DarthAffe,项目名称:HikariLauncher,代码行数:13,代码来源:FadingImageControl.xaml.cs

示例12: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PruebaPaneles;component/View/NodoCuadrado.xaml", System.UriKind.Relative));
     this.rectangle1 = ((System.Windows.Shapes.Rectangle)(this.FindName("rectangle1")));
     this.vbIcono1 = ((System.Windows.Controls.Viewbox)(this.FindName("vbIcono1")));
     this.vbIcono2 = ((System.Windows.Controls.Viewbox)(this.FindName("vbIcono2")));
     this.btLinkDiagram = ((System.Windows.Controls.Button)(this.FindName("btLinkDiagram")));
     this.vbIcono3 = ((System.Windows.Controls.Viewbox)(this.FindName("vbIcono3")));
     this.btLink = ((System.Windows.Controls.Button)(this.FindName("btLink")));
     this.tbTitulo = ((System.Windows.Controls.TextBox)(this.FindName("tbTitulo")));
 }
开发者ID:faelazo,项目名称:MindGenerator,代码行数:14,代码来源:NodoCuadrado.g.i.cs

示例13: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PruebaPaneles;component/View/NodoCirculo.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.elipse = ((System.Windows.Shapes.Ellipse)(this.FindName("elipse")));
     this.tbTitulo = ((System.Windows.Controls.TextBox)(this.FindName("tbTitulo")));
     this.vbIcono1 = ((System.Windows.Controls.Viewbox)(this.FindName("vbIcono1")));
     this.vbIcono2 = ((System.Windows.Controls.Viewbox)(this.FindName("vbIcono2")));
     this.btLink = ((System.Windows.Controls.Button)(this.FindName("btLink")));
     this.btLinkDiagram = ((System.Windows.Controls.Button)(this.FindName("btLinkDiagram")));
 }
开发者ID:faelazo,项目名称:MindGenerator,代码行数:14,代码来源:NodoCirculo.g.cs

示例14: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PruebaPaneles;component/View/NodoTriangulo.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.triangle = ((Microsoft.Expression.Shapes.RegularPolygon)(this.FindName("triangle")));
     this.lbTitulo = ((System.Windows.Controls.TextBox)(this.FindName("lbTitulo")));
     this.cvIcono1 = ((System.Windows.Controls.Viewbox)(this.FindName("cvIcono1")));
     this.cvIcono2 = ((System.Windows.Controls.Viewbox)(this.FindName("cvIcono2")));
     this.btLink = ((System.Windows.Controls.Button)(this.FindName("btLink")));
     this.btLinkDiagram = ((System.Windows.Controls.Button)(this.FindName("btLinkDiagram")));
 }
开发者ID:faelazo,项目名称:MindGenerator,代码行数:14,代码来源:NodoTriangulo.g.i.cs

示例15: goNext

        private void goNext()
        {
            string next = globalDatasingleton.getInstance().getNext();
            if (next == null) return;
            if (next == "") return;

            MyImage img = new MyImage();
            img.OriginalPath = next;
            img.Source = new BitmapImage(new Uri(next));
            Viewbox vb = new Viewbox { Width = 200, Child = img };

            LoadVBox(ref vb);
            //LoadVBox(ref next);
        }
开发者ID:zebulon75018,项目名称:photochoicetouch,代码行数:14,代码来源:onePhotoPage.xaml.cs


注:本文中的System.Windows.Controls.Viewbox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。