XAML WPF绘图图像的高度和宽度

bpzcxfmw  于 2022-12-07  发布在  其他
关注(0)|答案(1)|浏览(198)

在WPF应用程序上看到的绘图图像看起来非常小,我应该在绘图图像中做什么更改,以便在应用程序上看到的图像看起来有点大?

<DrawingImage x:Key="_3516599_configuration_list_options_preferences_setting_iconDrawingImage">
  <DrawingImage.Drawing>
    <DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
      <DrawingGroup Opacity="1">
        <DrawingGroup Opacity="1">
          <GeometryDrawing Brush="#FF000000" Geometry="F0 M48,48z M0,0z M3.745,35.705L3.745,12.776C3.745,11.106,5.101,9.75,6.771,9.75L41.42,9.75C43.088,9.75,44.448,11.104,44.448,12.776L44.448,35.705C44.448,37.376,43.091,38.731,41.42,38.731L6.771,38.731C5.101,38.731,3.745,37.376,3.745,35.705z M42.534,35.705L42.534,12.776C42.534,12.165,42.036,11.666,41.42,11.666L6.771,11.666C6.158,11.666,5.661,12.163,5.661,12.776L5.661,35.705C5.661,36.317,6.158,36.816,6.771,36.816L41.42,36.816C42.034,36.816,42.534,36.317,42.534,35.705z" />
          <GeometryDrawing Brush="#FF000000" Geometry="F0 M48,48z M0,0z M7.107,13.589C7.107,13.082 7.52,12.67 8.026,12.67 8.533,12.67 8.944,13.082 8.944,13.589 8.944,14.093 8.533,14.506 8.026,14.506 7.52,14.506 7.107,14.093 7.107,13.589z M9.707,13.589C9.707,13.082 10.119,12.67 10.625,12.67 11.131,12.67 11.544,13.082 11.544,13.589 11.544,14.093 11.131,14.506 10.625,14.506 10.119,14.506 9.707,14.093 9.707,13.589z M12.306,13.589C12.306,13.082 12.718,12.67 13.223,12.67 13.729,12.67 14.142,13.082 14.142,13.589 14.142,14.093 13.729,14.506 13.223,14.506 12.718,14.506 12.306,14.093 12.306,13.589z" />
        </DrawingGroup>
        <GeometryDrawing Brush="#FF000000" Geometry="F0 M48,48z M0,0z M23.365,28.029L23.086,26.844C22.773,26.753,22.477,26.63,22.196,26.478L21.037,27.196C20.735,27.385,20.383,27.444,20.132,27.196L19.605,26.665C19.353,26.417,19.43,26.08,19.605,25.761L20.319,24.601C20.126,24.24,19.977,23.85,19.886,23.44L18.772,23.173C18.423,23.095,18.132,22.886,18.132,22.535L18.132,21.786C18.132,21.435,18.423,21.249,18.772,21.148L20.05,20.847 20.413,20.088C20.204,19.752 19.996,19.415 19.79,19.079 19.599,18.777 19.541,18.424 19.79,18.175L20.319,17.647C20.569,17.396,20.905,17.472,21.222,17.647L22.305,18.317 23.041,18.016C23.142,17.616 23.25,17.215 23.365,16.818 23.466,16.469 23.65,16.177 24.003,16.177L24.752,16.177C25.105,16.177,25.314,16.469,25.392,16.818L25.695,18.013 26.578,18.379C26.893,18.192 27.21,18.009 27.532,17.831 27.85,17.657 28.186,17.581 28.436,17.831L28.966,18.36C29.216,18.609,29.157,18.962,28.966,19.265L28.408,20.201 28.689,20.801C29.153,20.914 29.591,21.031 29.985,21.146 30.332,21.247 30.625,21.433 30.625,21.786L30.625,22.535C30.625,22.886,30.334,23.093,29.985,23.173L28.861,23.459 28.51,24.461C28.73,24.827 28.944,25.202 29.153,25.574 29.327,25.893 29.401,26.23 29.153,26.478L28.623,27.008C28.373,27.259,28.023,27.198,27.721,27.008L26.699,26.402C26.377,26.589,26.033,26.738,25.671,26.844L25.395,28.029C25.314,28.378,25.107,28.67,24.754,28.67L24.005,28.67C23.652,28.67,23.469,28.376,23.365,28.029z M26.668,22.424C26.668,21.161 25.642,20.135 24.377,20.135 23.118,20.135 22.092,21.161 22.092,22.424 22.092,23.684 23.118,24.71 24.377,24.71 25.642,24.71 26.668,23.684 26.668,22.424z" />
        <GeometryDrawing Brush="#FF000000" Geometry="F0 M48,48z M0,0z M17.566,34.392L17.566,33.234 18.725,33.234 18.725,34.392 17.566,34.392z M19.549,34.392L19.549,33.234 20.707,33.234 20.707,34.392 19.549,34.392z M21.533,34.392L21.533,33.234 22.69,33.234 22.69,34.392 21.533,34.392z M23.515,34.392L23.515,33.234 24.676,33.234 24.676,34.392 23.515,34.392z M25.499,34.392L25.499,33.234 26.658,33.234 26.658,34.392 25.499,34.392z M27.482,34.392L27.482,33.234 28.642,33.234 28.642,34.392 27.482,34.392z M29.468,34.392L29.468,33.234 30.625,33.234 30.625,34.392 29.468,34.392z M17.566,32.543L17.566,31.383 18.725,31.383 18.725,32.543 17.566,32.543z M19.549,32.543L19.549,31.383 20.707,31.383 20.707,32.543 19.549,32.543z M21.533,32.543L21.533,31.383 22.69,31.383 22.69,32.543 21.533,32.543z M23.515,32.543L23.515,31.383 24.676,31.383 24.676,32.543 23.515,32.543z M25.499,32.543L25.499,31.383 26.658,31.383 26.658,32.543 25.499,32.543z M27.482,32.543L27.482,31.383 28.642,31.383 28.642,32.543 27.482,32.543z M29.468,32.543L29.468,31.383 30.625,31.383 30.625,32.543 29.468,32.543z" />
        <GeometryDrawing Brush="#FF000000" Geometry="F0 M48,48z M0,0z M12.493,34.392L9.201,34.392C8.907,34.392 8.669,34.153 8.669,33.86 8.669,33.568 8.907,33.328 9.201,33.328L12.493,33.328C12.784,33.328 13.025,33.568 13.025,33.86 13.025,34.152 12.785,34.391 12.493,34.392z M37.648,34.392L34.355,34.392C34.062,34.392 33.824,34.153 33.824,33.86 33.824,33.568 34.062,33.328 34.355,33.328L37.648,33.328C37.939,33.328 38.179,33.568 38.179,33.86 38.179,34.152 37.94,34.391 37.648,34.392z M13.855,32.464L9.186,32.464C8.892,32.464 8.654,32.226 8.654,31.933 8.654,31.64 8.892,31.4 9.186,31.4L13.855,31.4C14.146,31.4 14.386,31.64 14.386,31.933 14.386,32.225 14.147,32.463 13.855,32.464z M39.01,32.464L34.341,32.464C34.047,32.464 33.809,32.226 33.809,31.933 33.809,31.64 34.047,31.4 34.341,31.4L39.01,31.4C39.301,31.4 39.541,31.64 39.541,31.933 39.541,32.225 39.302,32.463 39.01,32.464z M12.493,30.083L9.201,30.083C8.907,30.083 8.669,29.845 8.669,29.551 8.669,29.26 8.907,29.019 9.201,29.019L12.493,29.019C12.784,29.019 13.025,29.26 13.025,29.551 13.025,29.844 12.785,30.082 12.493,30.083z M37.648,30.083L34.355,30.083C34.062,30.083 33.824,29.845 33.824,29.551 33.824,29.26 34.062,29.019 34.355,29.019L37.648,29.019C37.939,29.019 38.179,29.26 38.179,29.551 38.179,29.844 37.94,30.082 37.648,30.083z M13.855,28.155L9.186,28.155C8.892,28.155 8.654,27.916 8.654,27.623 8.654,27.332 8.892,27.091 9.186,27.091L13.855,27.091C14.146,27.091 14.386,27.332 14.386,27.623 14.386,27.915 14.147,28.154 13.855,28.155z M39.01,28.155L34.341,28.155C34.047,28.155 33.809,27.916 33.809,27.623 33.809,27.332 34.047,27.091 34.341,27.091L39.01,27.091C39.301,27.091 39.541,27.332 39.541,27.623 39.541,27.915 39.302,28.154 39.01,28.155z" />
      </DrawingGroup>
    </DrawingGroup>
  </DrawingImage.Drawing>
</DrawingImage>
fafcakar

fafcakar1#

使用DrawingImage作为具有适当大小和Stretch值的Image元素的Source

<Image Source="{StaticResource _3516599_configuration_list_options_preferences_setting_iconDrawingImage}"
       Width="100" Height="100"
       Stretch="Uniform"/>

相关问题