{"id":479,"date":"2019-08-05T20:18:01","date_gmt":"2019-08-05T11:18:01","guid":{"rendered":"https:\/\/kagamine-rin.com\/?p=479"},"modified":"2019-08-05T20:18:01","modified_gmt":"2019-08-05T11:18:01","slug":"wpf-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%a8%ec%9d%98-scrollviewer%ec%97%90%ec%84%9c-windows-ptpprecision-touch-pad-driver%eb%a5%bc-%ec%82%ac%ec%9a%a9%ed%95%98%eb%8a%94-%ed%84%b0%ec%b9%98%ed%8c%a8","status":"publish","type":"post","link":"https:\/\/kagamine-rin.com\/?p=479","title":{"rendered":"WPF \ud504\ub85c\uadf8\ub7a8\uc758 ScrollViewer\uc5d0\uc11c Windows PTP(Precision Touch-Pad) Driver\ub97c \uc0ac\uc6a9\ud558\ub294 \ud130\uce58\ud328\ub4dc\ub85c \uc2a4\ud06c\ub864\uc2dc \uc2a4\ud06c\ub864\uc774 \ub108\ubb34 \ube68\ub77c\uc9c0\ub294 \uc624\ub958 \uc218\uc815\ubc95"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\uacb0\ub860\ubd80\ud130 \ub9d0\ud558\uba74, <strong><span style=\"text-decoration: underline;\">WPF\uc758 \ubc84\uadf8<\/span><\/strong>\uc774\ub2e4. \uac19\uc740 SDK\ub97c \uc0ac\uc6a9\ud558\ub294 <strong><span style=\"text-decoration: underline;\">Win Forms\uc5d0\uc11c\ub294 \ub098\ud0c0\ub098\uc9c0 \uc54a\ub294 \ud604\uc0c1\uc774\ub2e4<\/span><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ubb38\uc81c\uac00 \ub418\ub294 \ud604\uc0c1\uc740 <strong><span style=\"text-decoration: underline;\">WPF \ud504\ub85c\uadf8\ub7a8<\/span><\/strong><span style=\"text-decoration: underline;\">\uc758 <\/span><strong><span style=\"text-decoration: underline;\">ScrollViewer\ub97c \uc0ac\uc6a9\ud558\ub294 UI Element<\/span><\/strong><span style=\"text-decoration: underline;\">\uc5d0\uc11c <\/span><strong><span style=\"text-decoration: underline;\">PTP<\/span><\/strong><span style=\"text-decoration: underline;\"> <\/span><strong><span style=\"text-decoration: underline;\">\ub4dc\ub77c\uc774\ubc84\ub97c \uc0ac\uc6a9\ud558\ub294 \ud130\uce58\ud328\ub4dc<\/span><\/strong>(\uc694\uc998 \ub098\uc624\ub294 \ub7a9\ud0d1\uc5d0\uc11c\ub294 \ub9ce\uc774 \uc0ac\uc6a9\ud55c\ub2e4)<span style=\"text-decoration: underline;\">\ub85c \uc2a4\ud06c\ub864\ud558\uba74 <\/span><strong><span style=\"text-decoration: underline;\">\uc2a4\ud06c\ub864 \uc18d\ub3c4\uac00 \ub9d0\ub3c4 \uc548\ub418\uac8c \ube68\ub77c\uc9c0\ub294 \ud604\uc0c1<\/span><\/strong>\uc774\ub2e4. \uac70\uc758 \uc2a4\ud06c\ub864 \uac70\ub9ac\uc5d0 \ube44\ud574 10~20\ubc30\ub294 \ube60\ub974\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ub97c \uc218\uc815\ud558\ub824\uba74 <strong>ScrollViewer<\/strong>\uc758 <strong>PreviewMouseWheel <\/strong>\ub97c \uc124\uc815\ud574\uc57c\ud55c\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc6d0\ub9ac\ub294 \uac04\ub2e8\ud558\ub2e4.  <strong>PreviewMouseWheel<\/strong>\uc5d0\uc11c <strong>EventArgs<\/strong>\uc758 <strong>Handled<\/strong>\ub97c <strong>true<\/strong>\ub85c \uc124\uc815\ud558\uba74\uc2a4\ud06c\ub864\uc774 \ub418\uc9c0 \uc54a\ub294\ub2e4. \uc774 \ub54c <strong>EventArgs<\/strong>\uc758 <strong>Delta<\/strong>\ub97c \ubc1b\uc544\uc640 \uc77c\uc815 <strong>threshold<\/strong>\ub97c \ub118\uc9c0 \uc54a\uac8c \uc2a4\ud06c\ub864 \uc2dc\ucf1c\uc8fc\uba74 \ub41c\ub2e4. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc544\ub9c8\ub3c4 \uc624\ub958 \uc790\uccb4\ub294 <strong>Delta<\/strong>\uac12\uc774 \ub9e4\uc6b0 \ucee4\uc9c0\ub294 \uac83\uacfc \uad00\ub828\ub41c \uac83\uac19\ub2e4. <strong>PreviewMouseWheel<\/strong> \uc774\ubca4\ud2b8\uac00 \uacfc\ub3c4\ud558\uac8c \ubd88\ub9ac\ub294 \uac83\uc740 \uc544\ub2c8\ub77c\ub294 \uac83\uc774\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ub610\ud55c,  \uacbd\ud5d8\uc0c1  threshold \uac12\uc740 int\uac12 48\uc774 \uac00\uc7a5 \uc801\ub2f9\ud588\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> <strong>PreviewMouseWheel<\/strong>  \uc774\ubca4\ud2b8 \uba54\uc18c\ub4dc\uc758 \uc608\uc2dc \ucf54\ub4dc\ub294 \uc544\ub798\uc640 \uac19\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void HandleScroll(object sender, MouseWheelEventArgs e)\n{\n    int threshold = 48;\n    ScrollViewer scrollViewer = (ScrollViewer)sender;\n    double target = scrollViewer.VerticalOffset - Math.Min(Math.Max(e.Delta, -threshold), threshold);\n    scrollViewer.ScrollToVerticalOffset(target);\n    e.Handled = true;\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uacb0\ub860\ubd80\ud130 \ub9d0\ud558\uba74, WPF\uc758 \ubc84\uadf8\uc774\ub2e4. \uac19\uc740 SDK\ub97c \uc0ac\uc6a9\ud558\ub294 Win Forms\uc5d0\uc11c\ub294 \ub098\ud0c0\ub098\uc9c0 \uc54a\ub294 \ud604\uc0c1\uc774\ub2e4. \ubb38\uc81c\uac00 \ub418\ub294 \ud604\uc0c1\uc740 WPF \ud504\ub85c\uadf8\ub7a8\uc758 ScrollViewer\ub97c \uc0ac\uc6a9\ud558\ub294 UI Element\uc5d0\uc11c PTP \ub4dc\ub77c\uc774\ubc84\ub97c \uc0ac\uc6a9\ud558\ub294 \ud130\uce58\ud328\ub4dc(\uc694\uc998 \ub098\uc624\ub294 \ub7a9\ud0d1\uc5d0\uc11c\ub294 \ub9ce\uc774 \uc0ac\uc6a9\ud55c\ub2e4)\ub85c \uc2a4\ud06c\ub864\ud558\uba74 \uc2a4\ud06c\ub864 \uc18d\ub3c4\uac00 \ub9d0\ub3c4 \uc548\ub418\uac8c \ube68\ub77c\uc9c0\ub294 \ud604\uc0c1\uc774\ub2e4. \uac70\uc758 \uc2a4\ud06c\ub864 \uac70\ub9ac\uc5d0 \ube44\ud574 10~20\ubc30\ub294 \ube60\ub974\ub2e4. \uc774\ub97c \uc218\uc815\ud558\ub824\uba74 ScrollViewer\uc758 PreviewMouseWheel \ub97c \uc124\uc815\ud574\uc57c\ud55c\ub2e4. \uc6d0\ub9ac\ub294 \uac04\ub2e8\ud558\ub2e4. PreviewMouseWheel\uc5d0\uc11c EventArgs\uc758 Handled\ub97c true\ub85c \uc124\uc815\ud558\uba74\uc2a4\ud06c\ub864\uc774 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[11,10,7],"tags":[],"class_list":["post-479","post","type-post","status-publish","format-standard","hentry","category-c","category-wpf","category-7"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/posts\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=479"}],"version-history":[{"count":22,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/posts\/479\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=\/wp\/v2\/posts\/479\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kagamine-rin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}